Regular Expression Renames

PreviousUpNext

In a Folder Compare session you can rename a group of files or folders all at once using Perl-compatible Regular Expressions.

In a Folder Compare session, select two or more files with different names, and pick Actions > Rename .  In the Rename dialog pick Regular expressions.  In the Old mask edit, enter a regular expression that is matched against the original filename.  In the New mask edit, enter a template used to generate a new filename.

A template is the expression used with the regular expression defined in the Old mask edit to create a new filename.

Example - Partial name change

If "ABCDEF" is the file name, and you want to change "CD" to "HJ", enter "CD" in the Old mask edit and "HJ" in the New mask edit.  The new filename will be "ABHJEF".

Example - Complete name change

If "Beyond" is the file name, and you want to change it to "Scooter", enter ".*" in the Old mask edit and "Scooter" in the New mask edit.

You can also change the filename by entering "Beyond" in the Old mask edit and "Scooter" in the New mask edit.  However, for simple renames, it's easier to pick DOS compatible instead.

Example - Changing a group of filenames

If you have a group of text files with six-letter names, and you want to swap the first three and the last three letters, enter "(...)(...).txt" in the Old mask edit and "$2$1.txt" in the New mask edit.  In this case, "beyond.txt" becomes "ondbey.txt".

Another example is if you have a group of music files that are titled "Artist-Song" and you want to change them to "Artist - Song", enter "-" in the Old mask edit and " - " in the New mask edit.