Changing double-extension via batch rename

  Mike2002 20:39 21 Sep 2010

I have some jpeg files that are named XXX.wmv.jpg, so they display as XXX.wmv

I've tried various .bat files to remove the .wmv bit, but haven't suceeded in making them work.

Can someone please give me 'code' to give a result.

  MAJ 22:23 21 Sep 2010

Probably the easiest way to do what you require, Mike2002, is to use a utility like the very useful "Bulk Rename Utility". click here

Drag the files, to be renamed, into the application's window and in the "Remove (5)" section, advance the "Last n" entry box to read "4". Select all the files you moved to the main window and click the Rename button. That will remove the last four characters of the file name, i.e. the .wmv bit.

  Mike2002 14:25 22 Sep 2010

Thanks MAJ, it worked a treat. The interface looks daunting at first but, if it wasn't for your your instructions, it would have taken me some time to figure it out. It seems like a useful tool to have.

  MAJ 16:29 22 Sep 2010

It is indeed a useful tool to have installed, if you play with photos and videos a little, Mike2002. I'm glad it sorted your problem.

  lindand 16:48 18 Oct 2011

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.

  lindand 16:51 18 Oct 2011

Hmm, that didn't post the command lines correctly

Rename c:* *.

Rename c:* *.

Rename c:* *.xml.mpg

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

OnePlus 5 review

Alice Saey's mesmerising animation for Dutch singer Mark Lotterman

iPad Pro 10.5in (2017) review

Comment booster votre iPhone ?