I want to put the bottom directory name into a tag, but it doesn't run (Windows batch for all files in a directory).
e.g.: c:\pics\2012\12\event\picturename.jpg --> event
my code exiftool %path% -L "-Xmp-dc:Title<${Xmp:Title;%tl%;%tu%;%tp%} %%-1:d
What's wrong?
The %d etc format codes only work where a file name is expected. In your case you should use the directory name, and strip off what you don't want, maybe like this:
${directory;s(/$)();s(.*/)()}
This removes the trailing "/" from the Directory name, then removes everything up to and including the last remaining "/".
- Phil
Hi Phil,
it did work. Thanks a lot! Before I waste 8 hours to find a bug.
In between I thought about the reason you mentioned, but I didn't want to believe it.
The possibility to pick a direct directory level with %d commands looks to sexy.
Ulrich