Option to update creation time at the end of program - Windows only #388
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds an option called "update-creation-time" that currently works only on Windows. If the user opts to use this option, the program will update the creation times of files in the output folder to match their last modified times at the end of the program (after all files are in output folders).
This option uses PowerShell commands combined with batch logic to avoid starting a new PowerShell process for every file (it currently ensures that the command does not exceed 32,000 characters, which is near the command-line limit). Thanks to this batch logic, it can update 50 or more files per PowerShell execution (instead of 1 file per PowerShell execution), allowing thousands of files to be updated very quickly.
This batch logic could also be applied to shortcut creation for Windows users in the future, because currently creating shortcuts (when
shortcut
option is selected) for large collections of images takes a long time, as it executes one PowerShell command per media file.In the future it may be possible to add this option for macOS users, but the limitation is that users need to have Xcode installed.
It partially fixes #371