Hi,
many thanks for the great software that I've gladly used over many years!
I'm trying now something quite easy, renaming photos with EXIF data. I've tried this:
nconvert.exe -o $EXIF:DateTaken["%F"] *.jpg
But nothing appends. Documentation didn't help. Can someone please help me?
Mambobuzzz
Rename photos with EXIF
Moderators: XnTriq, helmut, xnview
-
- Author of XnView
- Posts: 44616
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
-
- Posts: 21
- Joined: Sat Oct 30, 2021 4:33 pm
Re: Rename photos with EXIF
Hi there, I'm trying to use this code from a bath file in windows 10, NCONVERT v7.95:
.\NConvert\nconvert -o $EXIF:DateTaken[%%Y%%m%%d-%%H%%M%%S]_%% -keep_icc -ratio -rtype hanning -rflag decr -resize shortest 1500 -D -overwrite "..\*.png" "..\*.jpg" "..\*.jpeg"
the problems I have are:
1) the converted files are saved in the directory of the batch script, not in the upper directory ..\ where are the original files
2) when the original files are .png as EXIF info I have the filename
3) I want to separate the EXIF info from the filename with _ but I'm not able...
the original file names I have are:
IMG_3173.JPG
IMG_3174.JPG
IMG_3175.PNG
IMG_3177.PNG
IMG_3176.PNG
and the ouput file names are:
mIMG_3175d-IMG_3175HIMG_3175MIMG_3175S]_IMG_3175.png
mIMG_3176d-IMG_3176HIMG_3176MIMG_3176S]_IMG_3176.png
20211018-121005IMG_3173.jpg
mIMG_3177d-IMG_3177HIMG_3177MIMG_3177S]_IMG_3177.png
20211018-121430IMG_3174.jpg
help or suggestions will be appreciated!
best regards
.\NConvert\nconvert -o $EXIF:DateTaken[%%Y%%m%%d-%%H%%M%%S]_%% -keep_icc -ratio -rtype hanning -rflag decr -resize shortest 1500 -D -overwrite "..\*.png" "..\*.jpg" "..\*.jpeg"
the problems I have are:
1) the converted files are saved in the directory of the batch script, not in the upper directory ..\ where are the original files
2) when the original files are .png as EXIF info I have the filename
3) I want to separate the EXIF info from the filename with _ but I'm not able...
the original file names I have are:
IMG_3173.JPG
IMG_3174.JPG
IMG_3175.PNG
IMG_3177.PNG
IMG_3176.PNG
and the ouput file names are:
mIMG_3175d-IMG_3175HIMG_3175MIMG_3175S]_IMG_3175.png
mIMG_3176d-IMG_3176HIMG_3176MIMG_3176S]_IMG_3176.png
20211018-121005IMG_3173.jpg
mIMG_3177d-IMG_3177HIMG_3177MIMG_3177S]_IMG_3177.png
20211018-121430IMG_3174.jpg
help or suggestions will be appreciated!
best regards
-
- Posts: 21
- Joined: Sat Oct 30, 2021 4:33 pm
Re: Rename photos with EXIF
well, for the problem 3) I found that I can scape the character with $_ but now don't save the .png files
Error: Can't create file (mIMG_3177d-IMG_3177HIMG_3177MIMG_3177S]C:\Users\noadmin\Desktop\Nueva carpeta\Nueva carpeta\-IMG_3177.png)
Error: Can't create file (mIMG_3177d-IMG_3177HIMG_3177MIMG_3177S]C:\Users\noadmin\Desktop\Nueva carpeta\Nueva carpeta\-IMG_3177.png)
-
- Author of XnView
- Posts: 44616
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Rename photos with EXIF
you need to use
Code: Select all
-o ..\$EXIF:DateTaken[%%Y%%m%%d-%%H%%M%%S]_%%
PNG files don't have EXIF2) when the original files are .png as EXIF info I have the filename
Pierre.
-
- Posts: 21
- Joined: Sat Oct 30, 2021 4:33 pm
Re: Rename photos with EXIF
hello, many thanks for your response,
I need to scape $_ otherwise don't put the correct name on .png files.
.\NConvert\nconvert -o ..\$EXIF:DateTaken[%%Y%%m%%d-%%H%%M%%S]$_%% -keep_icc -ratio -rtype hanning -rflag decr -resize shortest 1500 -D -overwrite "..\*.png" "..\*.jpg" "..\*.jpeg"
so there is no way to extract the date taken from PNG files?
I need to scape $_ otherwise don't put the correct name on .png files.
.\NConvert\nconvert -o ..\$EXIF:DateTaken[%%Y%%m%%d-%%H%%M%%S]$_%% -keep_icc -ratio -rtype hanning -rflag decr -resize shortest 1500 -D -overwrite "..\*.png" "..\*.jpg" "..\*.jpeg"
so there is no way to extract the date taken from PNG files?
-
- Author of XnView
- Posts: 44616
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Rename photos with EXIF
So you would like to extract EXIF date if present, else file date?
Pierre.
-
- Posts: 21
- Joined: Sat Oct 30, 2021 4:33 pm
Re: Rename photos with EXIF
Hi, yes, that's right.
-
- Posts: 21
- Joined: Sat Oct 30, 2021 4:33 pm
Re: Rename photos with EXIF
but file date would be the modification date, I guess, not the creation date right?
-
- Author of XnView
- Posts: 44616
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France