Applies to:
- Microsoft Windows 7 Professional
- Ms-DOS Command Prompt (6.1.7601)
What?
A quick article on how to rename multiple files using the command prompt and a bit of string manipulation. This example will rename files which contain the string "
(Copy)" and replace it with nothing (so removes it). The challenge here is the space character and delimiting by a string.
The Gist
copyrawstyler
-- What I have
Image00001 (Copy).jpg
Image00002 (Copy).jpg
-- What I want
Image00001.jpg
Image00002.jpg
- Image00001 (Copy).jpg
- Image00002 (Copy).jpg
-
- Image00001.jpg
- Image00002.jpg
How?
Before I continue, the undo may work in MS Windows (Control key + Z) but don't count on it. I'm going to use a short batch process but to save time on the different ways of doing this, the example below uses a command prompt to a) create a batch file b) use it to rename the files c) delete the batch file.
Category: MS-DOS :: Article: 574