ExifTool Forum

ExifTool => Newbies => Topic started by: smdnetau on March 08, 2020, 12:34:58 AM

Title: directory name with a hyphen
Post by: smdnetau on March 08, 2020, 12:34:58 AM
Hi,

I apologise if this has been answered elsewhere. I'm having trouble trying to output the following directory structure:

1st level: 2020
2nd level: 01 - January

The 1st and 2nd level are fine except I'd like to insert a hyphen between the month number and month name.

exiftool "-Directory<DateTimeOriginal" -d %Y/%m%B /directory

Thanks!
Title: Re: directory name with a hyphen
Post by: StarGeek on March 08, 2020, 12:40:36 AM
Any argument that has a space in it needs quotes around it.  If you're on Mac/Linux, you could also escape it with a backslash.
Any OS
exiftool "-Directory<DateTimeOriginal" -d "%Y/%m - %B" /directory

Other option for Mac/linux
exiftool "-Directory<DateTimeOriginal" -d %Y/%m\ -\ %B /directory
Title: Re: directory name with a hyphen
Post by: smdnetau on March 08, 2020, 01:56:08 AM
Wonderful. Thank you so much.