RENAMING FILES IN MS-DOS

MS-DOS has several options for renaming files. This includes adding characters and removing them as needed. Beware that renaming is powerful and there is now going back. Make a copy of the files if you are unclear about using advanced MS-DOS techniques.

* is the wildcard for all characters, ? is the wildcard for one character. Wildcard characters (* or ?) may be used with either the first or second filename designation.

EXTENDING FILE NAMES

To add more characters to a file name is easier.

rename *.* 1992*.* name all the files to start with 1992.

LEFT TRIM FILE NAMES

To left trim characters is less well known:

rename "abcd*.txt" "////*.txt"

The / represent a character that is desired to be removed.

ren "[#???] *.txt" "///////*.txt"

This will only rename files that start with [# , have a ] and a space as the 6th and 7th characters and end with a .txt.