All notable changes to this project will be documented in this file.
- Some functions still used
Exit- changed them all toInvoke-Close - Improved VersionNumber-Variable.
- Added a variable to change the version without having to go through the GUI and half of the script.
- Screwed up loading of local
PoshRSJob-Module.
- Option to use PoshRSJob without installing it by extracting it into the script's folder (syntax is important, i.e.
.\Modules\<VERSION.NUMER>\).
Start-GUIwill now return$falseif the necessary .NET Framework files cannot be found. The script will then change intoCLI-mode instead of exiting completely.
- Function
Invoke-PreventSleepto replacemc_preventsleep.ps1.
mc_preventsleep.ps1, as functionInvoke-PreventSleeptakes over.
Start-PreventingDoubleCopies- it includes the-AvoidIdenticalFiles 1-routine that was formerly included inStart-InputGetHash.- Some presets to
mc_parameter.json.
Start-InputGetHashnow happens after copying (if-AvoidIdenticalFiles 0). Files will be copied first, then the (remaining) hashes will be computed for verification. Therefore, files will be available faster while overall operation times should stay the same.
- Some old, already out-commented code from pre 0.8.1's
Start-DupliCheckOut().
- Function
Get-CurrentDate- thus replacing all thoseGet-Date -Format "yyyy-MM-dd HH:mm:ss"-stuff.
- Save HistFilePath as
$PSScriptRootinmc_parameters.json.
- Bugfix: If output-path was searched for duplis and files were found, but none of them were potential duplis, program would crash.
- Aesthetics (GUI): broadened
TextBoxesfor paths, rearranged somecheckboxes, improved behavior of format-checkboxes
Start-SpaceCheck()to check if free space is sufficient.-OverwriteExistingFilesto overwrite existing files instead of giving new files unique names.
-ThreadCount, as it is no longer needed.
- Bugfix: If no history-entries are found, the duplicate-check would fail because of the
null-array. - Improvement/change: if a different preset is loaded,
-SaveParamPresetNamewill get changed accordingly. (I always accidentally updated the old profile before...) - Bugfix:
Set-Parameters()would also try to save-GUI_CLI_Directand-Debug. - Improvement/change: Always check for specific parameters stored in your
mc_parameters.jsonviaGet-Parameters()if you leave them empty and when-GUI_CLI_DirectisGUIordirect. - Aesthetics: show PID regardless of
Debug-level, condense the bars a bit to improve readability.
-PresetFormats "Inter"- will look for.DNG- and.TIF-files.- Parameter
-JSONParamPath.
- Improvement towards hashes: calculate only what's needed - when it's needed.
- Changed
-DupliCompareHashesto-HistCompareHashes(also the respective GUI-values), as it is more accurate and less confusing. - Changed behavior of
Invoke-Pause()(access$timerwithout parameter)
- Comparison in
Start-DupliCheckOut(). - Small bugfixes and improvements (one
$script:Debug -gt1, several$a = $inter; $inter = $as were condensed)
- Only old code that was already commented out.
Compare-ObjectinStart-DupliCheckOut().
- Parameter-JSON-file is now fixed, but different presets can be saved to and loaded from it.
-JSONHistFilePathis now-HistFilePath.- GUI, so it reflects the changes.
-LoadParameterPresetNameto load parameters from mc_parameters.json.-SaveParameterPresetNameto save parameters to mc_parameters.json.
-JSONParamPath.
- Renamed subfiles from
media_copytool_tomc_ - Improvement: Parameters are now available through a JSON-file via
-JSONParamPath. - Improvement: History-file can be set via
-JSONHistFilePath.
-JSONParamPath¶meters.json-JSONHistFilePath
- Bugfix: As Windows has an unattended timeout-counter,
preventsleepwill now poll every 90 seconds. - Improvement:
Write-ColorOutneeds fewer[Console]-queries. - Improvement:
Start-DupliCheckHisthas realignedproperties-variable forCompare-Object(now beforefor-loop, not inside it).
Start-DupliCheckOutandSet-HistFilenow include found files in history-file.
- GUI gets now called from within function
Start-GUI, so it can close and open up again (no more window-debris!) - Unthrottled the
RSJobs, as it seemingly decreases use of ressources try-catching all file-operations (Get-FileHash,Remove-Item,Rename-Item,New-Item)- Changed the way
Write-ColorOut-indentations work.
- Some parts about multithreading the last parts: as they all take longer when multithreaded, these parts are commented out. (They were a lot of work, that's why they stay there.)
Write-ColorOutnow has a parameter-Indentationwhich will change theLeftCursor-position.
-AvoidIdenticalFiles-Parameter + GUI-checkbox. Now one can opt to only copy one of multiple identical files that are present on the input-path.
- Split Function
StartFileSearchAndCheckinto sub-functionsStart-FileSearch,Start-DupliCheckHist,Start-DupliCheckOut,Start-InputGetHash. Adapted code inStart-Everythingto reflect this. - Bugfix:
"$($PSScriptRoot)"instead of"$PSScriptRoot"inSet-HistFile - Bugfix:
"$($PSCommandPath)"instead of"$PSCommandPath"in$WPFbuttonAbout.Add_Click - Bugfix: Check for compromised history-file in
Get-HistFilewould falsely alarm user in case of only one entry. - Cosmetic: Debug-Output is now competely optional
- Cosmetic: Console-Outputs from Functions are now indented
- Renamed script (removed "-MT", as both branches are now multithreaded).
- Bugfix:
media_copytool_preventsleepwouldn't close properly due to a wrongly named variable. - Bugfix: Progress-bars should now all close properly.
- Change:
-ThreadCount's description was updated due to performance-tests. Default-value now is 6, range can go from 2-48.
- Bugfix: preventsleep wasn't working with
PoshRSJob, so reverted topreventsleep.ps1.
media_copytool_preventsleep.ps1.
- Bugfix: in
-GUI_CLI_direct direct,Get-UserValueswould always return$false. - Bugfix: all
for-loops should now work with single files, too. - Bugfix: Mirror-Archive would not copy all files.
- Option to show found input-files in
-debug >= 1
- Bugfix: If both
-OutputSubfolderStyleand-OutputFileStyleare set tounchanged, Robocopy would not copy all files correctly at the first attempt.
- Bugfix: In
-GUI_CLI_Direct "direct",-PresetFormatswouldn't work. - Bugfix: If >0 filed were found corrupt/missing, all files were re-copied.
-OutputFileStyle-Parameter and -Function
- Small things: remove histfile-variable after use to save a few KB of RAM, mainly
-ZipArchive-Parameter and -Function- Failsafe for GUI.
- Option
unchangedto-OutputSubfolderStyle- works like Robocopy's/MIR.
-VerifyCopies- now verifying copied files is optional.
- Small improvements for readability of if-conditions in the code.
- Outsourced XAML-code for GUI from script-file, added
GUI.xaml-file. - GUI-Layout for readability
media_copytool_GUI.xaml
- XAML-code from
media_copytool.ps1
- Rough structure for 7zip (should come with 0.7.0, which should be the next release.)
- Option to remove the input-drive safely after copying and verificating to (first) output-path. Limition: only works on some drives, so please double-check if it worked.
- Changed test for output-paths in function
Get-UserValues:Split-Path -Qualifierenables to create new directories as long as they point to a valid drive. Thanks to https://stackoverflow.com/a/45596690/8013879 !
- Changed most
-Paths to-LiteralPaths - therefore, brackets should work now in paths. - Fixed encoding issues for good:
Start-Rememberingnow works, too.
- All special character detectors (because they now should work).
- Changed
for-loops withGet-FileHash-instances and Xcopy-instances toStart-RSJobs - Now the script truly supports multithreading, and it's fast!
Start-RSJobs forGet-FileHashand Xcopy- Parameter (and GUI TextBox & Slider)
ThreadCountto allow the user to experiment with different thread counts. To high numbers (with average equipment: >4) will slow everything down!
- Parameter (and GUI TextBox & Slider)
for-loops withGet-FileHash-instances and Xcopy-instances
Same code as 0.5-branch's 0.5.2 (2017-08-19), except from using PoshRSJob instead of preventsleep.ps1
- Fixing error in function
Start-Rememberingthat would result in messing up the parameter-variables - Changed from
Write-Hostto own functionWrite-ColorOutand functionWrite-Progressfor a more readable output and faster performance (Write-Hostis very slow) - Changed script's encoding back from
UTF-8toUTF-8 with BOM(hopefully, it stays that way now.)
- Sub-function in function
Get-UserValuesto remove trailing backslashes in the path-variables' values. $OutputEncodingis now set to UTF8 (after parameter-block), so hopefully there won't be any more errors because of wrong encodings in the future.
- Standby-prevention is now done via an RSJob instead of the external script
preventsleep.ps1
- New Function to replace
Write-Hostin future releases -> increase in performance - Warning-message if Module PoshRSJob is not installed
- RSJob
PreventSleep(see "changed")
- Script
preventsleep.ps1(see "changed")
- Fixed endless loop when getting the history-file.
- Sped up comparison with history-file (especially when it has many entries) by reversing the order of comparison (meaning that the latest files will be compared first).