Batch process files in Windows

From Finninday
Jump to: navigation, 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

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