Want to copy directories containing specific file type

I am consolidating pictures that are scattered among many directories on a drive, to a target directory on the root of the drive. I wish to identify all directories on the drive that currently contain JPEG files, and then copy each of those source directories to the target. There are numerous other file types mixed in with the JPEGs in the source directories, but I am looking to filter and only bring over the JPEGs. Please advise what the most efficient way of accomplishing this copy operation is.
Thank you

Use a copy filter

https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Copy.htm

Also see here

1 Like

If I understand correctly, the "Copy FLATVIEWCOPY=single" command will do as described above (starting from a filtered set of results that only shows JPEGs).

Please confirm.
Thank you

That would copy the jpeg files all into one place, without making any folders in the destination. If that's what you want, using Tools > Find Files to find all the jpegs and then copying them out of the results normally is quicker and easier than using Flat View.

But you said in the root post that you wanted to copy the directories as well, not just the files? You can do that from Flat View using the opposite option (Recreate instead of Single), or you can do it using a copy filter as lxp suggested.

Using a copy filter will be quicker if there are a lot of files and folders. It will also mean you have a one-click button (or hotkey, etc.) for doing this, if you need to do it often, which may be more convenient than manually switching to Flat View etc. each time.

1 Like