Creating nested folders on Windows

Started by EvilUnicorn, November 17, 2022, 09:14:54 AM

Previous topic - Next topic

EvilUnicorn

I'm using the Windows installer version by Oliver Betz.

For now I'm not even trying to rename files, just to move them to a new folder structure. I'm struggling to get it to work though. I starting of as simple as possible so all files are in a single folder. Goal is to reorganize to this folder structure: Year - month - brand and make
I tried:
exiftool -d -r "%Y/%m - %B" "-directory/$CreateDate/${model;}" .
but that results in invalid tag nare error. I guess I'm combining commands I found in a wrong way. Any suggestions on how to get this working?

Regards


StarGeek

The Directory is a "pseudo-tag" (see Writing "FileName" and "Directory" tags) and is treated like any other tag.  So to copy from the create date, you would use the less/greater than signs (see Common Mistake #5).

Also, you are splitting the -d (-dateFormat) option from the format string by sticking the -r (-recurse) option in the middle.

You command would more like this, assuming Windows CMD
exiftool -r -d "%Y/%m - %B" "-Directory<%d$CreateDate/${model;}" .

If you are using Mac/Linux/Powershell, change the double quotes to single quotes.  Also, you might want to change Directory into Testname to make sure the directory paths are correct before actually using Directory.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

EvilUnicorn

#2
Thanks, I'm making progress I guess. The command does fail with error message:

Warning: No writable tags set from ./20201111_143744.jpg
Warning: Invalid tag name '%d/'. Use '=' not '<' to assign a tag value - ./20201111_143744.jpg

I'll try some more

StarGeek

That error shows that the CreateDate and Model are not being read.  If you did not remove them, make sure your re-read my post and adjust the command as noted based upon what command line you are using.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

EvilUnicorn

That did it (" should be ')! On to renaming the files.

Thank you

EvilUnicorn