Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to update creation time at the end of program - Windows only #388

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Wacheee
Copy link

@Wacheee Wacheee commented Mar 1, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gpth sets last modified, but not file created date
1 participant