How to write a batch command to rename files

November 30, 2010 at 19:18:44
Specs: Windows XP
Hey everyone,

I'm trying to rename files after I copy them to a new location. The files all end in *d.exe and after I copy them I want to rename them to *.exe in the new location.

xcopy /y %CD%\*d.exe c:\newfolder\

Then rename the file in "newfolder" to Process.exe (instead of Processd.exe) - is that possible with a batch command?

See More: How to write a batch command to rename files

Report •

November 30, 2010 at 23:04:33
[1] What is %CD% doing in there?

[2] Do want to rename just the ones copied or any that match *d.exe?

Life is too important to be taken seriously.


Report •

December 1, 2010 at 05:21:51
I assumed %CD% was required for copying files out of the current directory. It doesn't matter really, preferably only the files I copy but all the files in the directory will be similar so whatever is easiest.

Report •

Related Solutions

Ask Question