Main Menu

Date time in Filename

Started by mugakuno@gmail.com, November 18, 2019, 05:53:29 AM

Previous topic - Next topic

mugakuno@gmail.com

Hi! I'm trying to rename all pictures in a directory so that they include the Date and Time when they were taken. I type the following command

exiftool "-FileName<DateTimeOriginal" -d "%Y%m%d-%H%M%S%%-c.jpg" .


but I get the following warning messages

Warning: No writable tags set from ./Dos.png
Warning: No writable tags set from ./Uno.png
    1 directories scanned
    0 image files updated
    2 image files unchanged


What am I doing wrong?
Thanks

Alan Clifford

Does that try to rename a .png to a .jpg?

StarGeek

PNG files rarely have the DateTimeOriginal tag.  You'll have to use a different tag to set the filename from.  See FAQ #3 to help figure out what tag you might want to use.

Also, as Alan pointed out, your command will rename PNG files to have a JPG extension.  Try using .%%e instead of .jpg and it will save the extension from the original filename.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

mugakuno@gmail.com

Yes, you were right, those PNG files didn't have the DateTimeOriginal tag. I've done again with jpg files and it worked.
Thank you!