Difference between revisions of "Batch process files in Windows"
From Finninday
(New page: Category: Microsoft This has been tested in XP and Vista. Something like a shell script is available in Windows for renaming all the files in a directory: for /F %x in ('dir /b') do...) |
(No difference)
|
Latest revision as of 21:08, 27 October 2009
This has been tested in XP and Vista.
Something like a shell script is available in Windows for renaming all the files in a directory:
for /F %x in ('dir /b') do move %x %x.new
That command will put a .new extension on each of the files in the current directory.
The following command will undo that transformation:
for /F %x in ('dir /b') do move %x %~nx
For more information see "for /help".