Home » Questions » Computers [ Ask a new question ]

How to sort by date in filename?

How to sort by date in filename?

I have a bunch of meeting minutes, where the filename is the date the meeting took place. I would like to sort by this date.

Asked by: Guest | Views: 58
Total answers/comments: 2
Guest [Entry]

"If the files were created on set dates you can just sort them by date in explorer. I'm guessing this is not the case. So if you rename files as Molly suggested (yyyy-mm-dd) then sorting by name will also sort them by date.

Since you already have a bunch of such files instead of renaming them one by one, I suggest you use Total commander, which has built in multi-rename tool. This tool enables you to easily rename files to this format. Just rename each batch of files that have same type of name after another.

To rename for example files named dd-mm-yyyy to yyyy-mm-dd:

select files you want to rename (using either r-mouse click or space)
press ctrl+M or select menu Files -> Multi rename tool
press Range button and select year part, press ok
repeat for month and day and put - in between, you should end up with [N7-10]-[N4-5]-[N1-2]
press Start button (bottom of the form) to run the renaming process
repeat the process for other groups with similar names"
Guest [Entry]

"Use something like Bulk Rename Utility to rename the files into the format yymmdd_anyothertext.doc, then sorting on name will arrange the files in date order.

BRU support regular expression, or if necessary you can just do the renaming in several passes if the regex isn't too obvious."