ExifTool Forum

ExifTool => Newbies => Topic started by: jawa78 on April 27, 2022, 11:12:10 AM

Title: Outputing files to another drive preserve directory structure
Post by: jawa78 on April 27, 2022, 11:12:10 AM
So my command output looks like this right now
exiftool -config /metadataimport/DirTree.config "-keywords+<DirTree" -tagsfromfile /metadataimport/metadata/someevent/2022/someevent_16.xmp -xmp:all -r -ext mov -ext mp4 -ext jpg -ext jpeg -ext nef -ext cr2 -ext cr3 -ext pdf -ext dng -o '/OTMM-APPPROD/HotFolder-someevent/' -@ /metadataimport/metadata/someevent/2022/someevent_16.txt  -overwrite_original

now the directory that called in someevent_16.txt has subfolders inside of it now when it outputts to the Hotfolder-someenvent all the files are just sitting in the root directory is there a way that when it read applys the meta data  to also recreate the directory structure.  This is recent change to our digital asset management now supports a virtual folder search based on how stuff is dropped into the hotfolder? if not no worries this is an amazing tool either way.
Title: Re: Outputing files to another drive preserve directory structure
Post by: Phil Harvey on April 27, 2022, 09:55:40 PM
Sure. Perhaps something like this?

-o '/OTMM-APPPROD/HotFolder-someevent/%:1d/'

My example removes the 1st directory level and adds the rest to the output directory name.  Change the "1" if you want to remove more.  I can't tell how many you need to remove because I don't know the contents of your txt file.

(This is explained in the "advanced features" section of the -w option documentation.)

- Phil