Why is a new directory being created when I attempt to rename?

Started by KingsCross, July 26, 2021, 10:29:46 PM

Previous topic - Next topic

KingsCross

I am trying to rename photos based on the AEBBracketValue tag:

exiftool '-filename<%f_AEB(${AEBBracketValue}).%e' -if '$BracketMode eq "AEB"' -r /path/to/dir

Terminal output:

    2 directories scanned
    1 directories created
1489 files failed condition
1706 image files updated


Here is the behavior I don't understand:

A new folder is created in my computer's home folder (not in the directory of images I am running the command on) with the following title: I01A0034_AEB(-2

Inside the folder is a single image titled: 3).CR2

Does anyone have any thoughts on what is going on? Notably the other images seem to be retitled correctly.

StarGeek

What is the value of AEBBracketValue?  Does it have a slash in it? I'm guessing the value is "-2/3".  A slash is used to indicate a new directory, which will be created in the current directory and the file moved to that new directory.

Use ${AEBBracketValue;} (with the semicolon) and exiftool will remove characters which are invalid in a filename.
* 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).

KingsCross

Wow! You were exactly correct! Bracket value was -2/3. Thanks!