Skip to content

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

License

Notifications You must be signed in to change notification settings

alexlyee/MoveFilesIntoDateDirectories-

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 deadlydog a hot apple cider for providing this script open source and for free :) Check out my GitHub sponsors if you would like to support my contribution by buying me a boba!

paypal

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PowerShell 100.0%