/MoveFilesIntoDateDirectories

Moves files from a directory into a new directory whose name is based on the file's date.

Primary LanguagePowerShellMIT LicenseMIT

Move Files Into Date Directories

This PowerShell script will scan all files in the SourceDirectoryPath and then move them into directories whose name is based on the file's LastWriteTime date. Target directories will be created if they don't already exist, using a name based upon the specified TargetDirectoriesDateScope, and they will be created within the TargetDirectoryPath. It is acceptable for the SourceDirectoryPath and TargetDirectoryPath to be the same directory path.

A common use-case of this script is to move photos into date-named directories based on when the photo was taken.

You can use the Invoke-MoveFilesIntoDateDirectories.ps1 script to easily provide parameters and run the cmdlet.

Example

Some various files that were last updated on different dates:

Source directory screenshot

The target directory containing the same files after the script ran and moved them into month date-named directories based on their LastWriteTime:

Target directory screenshot

Changelog

See what's changed in the application over time by viewing the changelog.

Donate

Buy me a hot apple cider for providing this script open source and for free :)

paypal