How to Rename Files with Double Extension

October 18, 2011 at 09:04:46
Specs: Windows XP
How to easily rename a file with a double extension
For example, the original file name might be C:\testfile.xxm.mpeg
New file name will be C:\testfile.xml.mpg

Rename c:\* *.
Rename c:\* *.
Rename c:\* *.xml.mpg

The first line removes the last extension (mpeg).
The second line removes the last extension again, originally the first extension (xxm).
The third line simply lets you add whatever extension you want to the now extensionless file.

Note that this will remove the last extension from any file that is in the directory.
If you want to only rename specific files, change the first wildcard to match the files you want to rename, or copy them to a different directory first and only work in that directory.

See More: How to Rename Files with Double Extension

Report •

October 18, 2011 at 09:46:25
Seems like a long and drawn out way to rewrite:
REN *.xxm.mpeg *.xml.mpg

How To Ask Questions The Smart Way

Report •

October 25, 2011 at 10:22:10
Becase doing that doesn't work, it only renames the last extension.

Report •

Related Solutions

Ask Question