Changing double-extension via batch rename

  Mike2002 20:39 21 Sep 10

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 10

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 10

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 10

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 11

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 11

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.

Qualcomm Snapdragon 835 benchmarks: Antutu, Geekbench 4, GFXBench and PCMark results

1995-2015: How technology has changed the world in 20 years

This stop-frame animation tells a moving story of domestic violence for Refuge

New iPad 2017 preview: Apple's affordable but underspecced new iPad may appeal to the education…