"Reformat dates in filename"

TARGET FILES:
All files (*.*)

CASE:
You have lots of files named with dates, but the dates are in format different than you need. In our example, files have dates in dd-mm-yyyy format and you need them in mm-dd-yyyy.

SOLUTION:
One way to help you navigate through your pictures is by adding the date the picture was taken at the beginning of the filename. This way, the time needed for searching a picture from a specific day can be significantly shorter. By typing the date the picture was taken in the search field (using Windows Explorer for example) and making a search you can find the appropriate picture in seconds.

Example FILEname:
Before: "25-12-2004 Final Proposal.doc"
After: "12-25-2004 Final Proposal.doc"

Download NIYoW:
In order to use this set, you must have NIYoW installed. Don't have NIYoW yet? Download now!

DOWNLOAD SET:
http://www.niyow.com/rules/gp_example01.rls

THE RULES:

#
Rule
Parameters
Description
1
Title & Extension: "Find and replace using regular expression"

Search Pattern="(\d{2})-(\d{2})-(\d{4})"

Replace With="$2-$1-$3"

Replace All="False"

Apply To="Title"

This rule uses regular expressions to find text in format dd-mm-yyyy, save the results to a buffer in the memory and then rebuild the text in mm-dd-yyyy. It does it by putting the saved values from the memory back in different order. You can read more about "Regular Expressions" HERE.

Possible enhancements:

  1. Replace all matching text - The Replace All parameter determines whether all matching text will be replaced or only the first one. If you have more than one date in your filename, change the Replace All parameter to "True". This will insure that every found text will be replaced.

Comments:
This is a very useful set when dealing dates in filenames. Regular Expression is highly recommended for advanced tasks. Regular expression can handle many situations where simple rules can't. Click HERE to learn more.