ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: dbareis on January 05, 2021, 12:00:53 AM

Title: "<Directory" Fails and Copies "." (current directory?) instead
Post by: dbareis on January 05, 2021, 12:00:53 AM
Hi,

I am a complete beginner but have set up a config file, created my own tags and groups and worked out pretty much all my other issues but this one may be a bug in the tool.

In the follow command line fragment, the only one that doesn't pick up the correct value is "Directory" (ScanFileFolder) which gets "." instead of the directory the file is contained in:

exiftool.exe ...  "-ScanFileName<filename" "-ScanFileTime<FileCreateDate" "-ScanFileFolder<Directory" ...


If there is another way to handle that specific attribute/tag then please let me know.
Title: Re: "<Directory" Fails and Copies "." (current directory?) instead
Post by: StarGeek on January 05, 2021, 12:33:39 AM
The Directory pseudo-tag will contain the part of the path that was using in the command.  If you're using a dot as a relative path to indicate the current directory or just the filename by itself, then Directory is only going to hold the dot.

You can use FilePath to get the absolute path for the file, but it will include the filename at the end.

Example
y:\!temp>exiftool -g1 -a -s -Directory -Filepath Test4.jpg
---- System ----
Directory                       : .
FilePath                        : Y:\!temp\Test4.jpg