Hello and thanks for everything.
I'm trying to recursively copy files that meet a condition, but I can't keep the original hierarchy in the destination directory.
I would appreciate if you would tell me where I am going wrong
I'm executing (Windows 10, powershell):
exiftool.exe -r -o DSTDIR -if '$category=~/Yecla/' SRCDIR
Use the %d token as listed under the Advanced features of the -w (-TextOut) option (https://exiftool.org/exiftool_pod.html#w-EXT-or-FMT--textOut).
I'm assuming that you want to remove a few of the top levels of the original directory path, so you would use %:#d, replacing the hashtag # with the number of top levels you want to remove and hardcode what you want in front of it. For example, if your file path was C:\Level2\Level3\Level4\file.jpg and you wanted to remove the top two levels, your command would be something like
exiftool.exe -r -o DSTDIR\%:2d -if '$category=~/Yecla/' SRCDIR
and you would end up with
DSTDIR\Level3\Level4\file.jpg
Thank you very much, I'll try it
Great!. It's works.
thanks a lot