Move found files and recreate directory stucture

A find query returned files. Files reside in a particular directory. The destination directory is empty. If I just move the found files then all files will be moved into one directory.

I want to be able to move the found files to the destination directory, the directory structure of the source should be recreated also.

Is this possible?

If you have a filter (e.g. made using the Find Panel's advanced page) which matches what you want to copy, you can use that to filter the copy itself, without needing to do a separate Find first or generate a collection:!Documents/Filtered_Operations.htm

If you need to copy out of a collection while preserving relative paths, it should be possible via commands or scripts (definitely via scripts).

Using Flat View is another option, depending on the situation. That can copy while preserving relative paths automatically.


Copy MOVE CREATEFOLDER="{destpath}{filepath$|..|noterm|noroot}"

Thank you all for the information.

@lxp: I just started to use Directory Opus. I assume this is a script, where should I input these commands? Please provide me a link on the subject and I will dive into it. Thank you.

That's a simple button. Have a look here on how to use it:

To understand how it works and how it can be adapted to your needs, look here:!Documents/Codes_for_passing_paths.htm!Documents/Codes_for_passing_filenames.htm

1 Like