Batch remove numbers from filename

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, xnview

Post Reply
Spiv
Posts: 1
Joined: Thu Jun 16, 2016 1:54 am

Batch remove numbers from filename

Post by Spiv »

Hi all,
I have a directory with 100+ pics and many have numbers either at the beginning or at the end.
The numbers are all different....
Is there a way to do a batch rename that filters the numbers?
I'd be happy to run it twice to remove numbers from the front and from the back of the filename.

Thanks and
Keep smiling
User avatar
michel038
Posts: 524
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: Batch remove numbers from filename

Post by michel038 »

You can remove numbers with a "regular expression" (reg exp) in "Batch Rename" tool
rename2.png
You can see that {Filename} is used for the first step,
then numbers are found with the regular expression [0-9]
and these numbers occurs from 1 to 5 times : {1-5}
and they will be replaced by a X .. or anything else you'll choose.

Before processing, check the whole list for new names, because sometimes some files will get the same name (or nearly the same name : see the file testX_02.jpg ) or incorrect names.
User avatar
Rick
Posts: 108
Joined: Sat Oct 08, 2005 4:10 pm
Contact:

Re: Batch remove numbers from filename

Post by Rick »

And if you find regular expressions daunting, you can get Rename Master which is the best out there for any renaming jobs including adding something in the case of collisions as @michel038 pointed out. This is one for the toolbox even if the instructions above covered your issue. He also has a clipboard manager which is also great. The are free and portable (donation ware but no nags)
http://www.joejoesoft.com/cms/showpage.php

Edit: the betas are stable
--
Rick
Post Reply