Tool struggles with specific chars in filename. You're altering them? WHY???

Started by BlackPlatypus, December 27, 2024, 10:53:57 AM

Previous topic - Next topic

BlackPlatypus

1) Windows 10, CMD
2) v13.10
3) "exiftool(-k).exe" "a 4∕4.png"
4) Error: File not found - a 4/4.png

Some of my filenames have division slashes (∕) in them.
They are not regular slashes, obviously.
Note that, in the above output, Exiftool has replaced it with a regular slash (You can even see them rendered differently in the screenshot)
Indeed, if I create a subfolder called "a4", and put a file called "4.png" in the test folder, IT READS THAT FILE INSTEAD!

I just had an idea: If it did the same with things like the two dot leader, we may be able to get some decent path traversal going for unlimited mischief 😈
"Sadly", that only gave
QuoteWildcards don't work in the directory specification
, though that sounds like that, too, is converted to two regular periods?

But obviously this is still bad. Not only do we not get the expected result, we may be getting a completely different result that LOOKS like the right result.
Lord only knows what unforeseen consequences there might be or what exploits lie within this quirky expansion.

If this is the result of a decision that won't be overturned: Can we have a switch to disable this re-imagining of filenames so we can still use the tool?
Otherwise: Please consider changing this behavior

a 4∕4.png

StarGeek

FAQ #18, problems with special characters on the Windows command line

I use the StackOverflow option mentioned in that FAQ. An example using the filename copied from your post.
C:\>exiftool -G1 -a -s -filename "Y:\!temp\x\y\a 4∕4.png"
[System]        FileName                        : a 4∕4.png
"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