Skip to content

ThatSameer/rename-in-date-order

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Rename Files in Date Order

Simple PowerShell script to rename files in a directory numerically based on the age of the files from oldest to newest.

New file names will be e.g. 1.png, 2.jpg, 3.pdf - 1 being the oldest file, 3 being the newest.

Expanding zeroes at the beginning will automatically be added based on the number of files to rename e.g. if there are 100 files, they will be renamed as 001.png, 002.png, 003.pdf etc.

LastWriteTime can be changed to CreationTime if required.

Run ps1 file within the directory you wish to rename.

Code referenced from: https://stackoverflow.com/questions/63830244/is-there-a-way-to-rename-files-based-on-date-modified-using-powershell (thanks)

About

Rename files numerically based on the age of the files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published