Batch alteration of file extensions in Windows XP

Posted on October 22nd, 2007 by dandavis

Do you need to change a folder full of .MOD files to a folder full of .MPG files? (Those of you with a JVC HDD camcorder might need to do just that!)

Use the FOR command!

Here's how:

G:\Movies>FOR %F IN (*.MOD) DO rename %F %~nF.MPG

G:\Movies>rename MOV001.MOD MOV001.MPG

G:\Movies>rename MOV002.MOD MOV002.MPG

G:\Movies>rename MOV003.MOD MOV003.MPG

%F is the filename and %~nF is the filename without the extension.