Batch process files in Windows

From finninday
Revision as of 21:08, 27 October 2009 by Rday (talk | contribs) (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...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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".