Page 1 of 1

Batch convert - rename fails

Posted: Tue Jan 21, 2020 9:58 pm
by mcbrx
Hi,

I convert old photos and change the file name, which then, among other things, should contain the camera model ({EXIF:Model}).
But, the batch conversion fails if there are strange EXIF ​​entries (see attached picture).
Can XnViewMP automatically exchange characters that are not allowed in the file system?
As a user, I am unfortunately unable to do this during batch conversion.

Thank you!

Re: Batch convert - rename fails

Posted: Tue Jan 21, 2020 10:50 pm
by michel038
You can use "Batch Rename" function :
First, add "Exif-Camera , Model" in the first field of this screen

Lower, use the "Replace" function and mark "use regex" : Write

Code: Select all

[^a-z A-Z0-9.]
in the first field.
This means : keep only a-z, A-Z, 0-9 characters ... (and a space, you can see it between z and A)

- Another way :

Code: Select all

 [#<>,]

This means : delete # < > and , characters

A sandbox to try and build regex expressions : https://regex101.com/

Re: Batch convert - rename fails

Posted: Tue Jan 21, 2020 11:38 pm
by mcbrx
Thanks, of course it works.

But, unfortunately, renaming with Replace/Regular Expression cannot be combined with converting.
My plan is to reduce the size and copy it to another directory with changed file names.

Ok, it works now, but with 2 steps.