Wild cards with renameing

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

Moderators: helmut, XnTriq, xnview

Post Reply
IamFof
Posts: 11
Joined: Thu Jan 10, 2019 11:36 pm

Wild cards with renameing

Post by IamFof »

Guys
I am sure that this is doable, using a batch file, but I've not had to touch or think about them for about 40 yrs.
During this time of lockdown, I decided to rename and reorganise all my image files.
The file structure is NAME ## - Descriptor.xxx, where all the Descriptors are likely to be different, and xxx could be jpg, CR2, RW2, etc
I could well have, for example:-
NAME 01 - Fred.jpg
.
.
NAME 11 - Nancy.png
NAME 12 - The Ancient one.CR2
.
.
Name 32 - Me as a baby - Ugh.jpg

If I need to renumber NAME 12 - NAME 32 to NAME 17 - NAME 37, without altering the Descriptions or extensions, only the numbers.
How do I do it?
TIA
Stay safe and lookout for your neighbours.
Fof
User avatar
michel038
XnThusiast
Posts: 1468
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: Wild cards with renameing

Post by michel038 »

I think it's a bit dangerous

Edit: Go to next message for new version.


- Select only the files you want to rename,
-Tools, Batch rename
-Apply the settings shown in this picture
- OK
- Then, run another batch rename to add "NAME" at the beginning of file names
with only Name {filename} in the first field
(by checking / unchecking "Replace" you can understand how it works )
Attachments
batchRename.png
batchRename.png (36.17 KiB) Viewed 722 times
Last edited by michel038 on Fri Apr 03, 2020 6:56 am, edited 1 time in total.
User avatar
michel038
XnThusiast
Posts: 1468
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

NEW: Wild cards with renameing

Post by michel038 »

NEW VERSION one shot

- Select only the files you want to rename,
- Check that the sort order is correct.
- use : Tools, Batch rename
- Apply the settings shown in this picture
- Check if new names are right
go


(by checking / unchecking "Replace" you can understand how it works )
Attachments
BatchRename2.png
BatchRename2.png (53.54 KiB) Viewed 702 times
IamFof
Posts: 11
Joined: Thu Jan 10, 2019 11:36 pm

Re: Wild cards with renameing

Post by IamFof »

michel
Thank you.
That is how I am doing it at present.
I do realise the potential for a bit of a bloodbath, but was hoping to be able to do mixed blocks.
Regards
cday
XnThusiast
Posts: 4396
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Wild cards with renameing

Post by cday »

IamFof wrote: Fri Apr 03, 2020 8:47 am michel
Thank you.
That is how I am doing it at present.
I do realise the potential for a bit of a bloodbath, but was hoping to be able to do mixed blocks.
Presumably you could backup the relevant database to enable recovery, if necessary, I don't use metadata so I can't advise on how to do that..
Post Reply