If this site goes down it is because of the crappy DreamHost web hosting: They will disable your "unlimited traffic" web server if a single bot hammers the site with a moderate load.  If necessary, an alternate ExifTool forum page is available at

Main Menu

Outputing files to another drive preserve directory structure

Started by jawa78, April 27, 2022, 11:12:10 AM

Previous topic - Next topic


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.

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).