Move files after search, duplicating folder structure

I feel as if I recall knowing how to do this, but alas time passes...

Anyway, what I'm trying to do is search a folder that contains many subfolders for a certain type of file (e.g., .gif) and then move all of those files to another drive but in the same folder structure (e.g., if the files are E:\Pics\Folder1\image1.gif and E:\Pics\Folder23\image7.gif and I want to move them to F:\Pics(overflow), then I'd wind up with F:\Pics(overflow)\Folder1\image1.gif and F:\Pics(overflow)\Folder23\image7.gif).

Any help will be appreciated.

You can use Flat View.

  1. In the source directory (E:\Pics), enable Flat View: Mixed (No folders)
  2. Press * to open the Filter Bar and type *.gif as the filter
  3. Select All (Ctrl+A) and Copy (Ctrl+C)
  4. In the target directory, Paste (Ctrl+V), and Opus asks in a popup whether you want to Recreate the source directory structure.

A caveat is that flat view takes some time to display fully in step 1, if it's e.g. a NAS drive with tens of thousands of files.

Things can be sped up by first enabling the filter and then switching to Flat view.


If you want to copy files from search results, the path can be rebuilt using codes, like so:

@nofilenamequoting 
Copy CREATEFOLDER="{destpath}{filepath|..|noroot}"
1 Like

Thank you for those solutions!