Changing double-extension via batch rename

  Mike2002 20:39 21 Sep 10
Locked

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.

How to get Windows 10 for free | How to install Windows 10: There is still a way to avoid paying…

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

Alex Chinneck’s giant ice cube Christmas tree at Kings Cross

Apple rumours & predictions 2017: The iPhone 8, new iPads, and everything else you should expect fr7…