Preserve folder structure when copying from collection

I have a collection that contains multiple files with the same name, which were added from different locations.

I would like to copy these files from the collection into a temporary directory, preserving the original folder structure.

e.g. if my collection contains:

Name / Location

file.txt / c:\one\two
file.txt / d:\three\four\five

and I copy the files to e:\temp, I would like to end up with the following structure:


or some variation on this idea e.g. including the original drive letter in the path:


I see that there's an option 'When copying files in Flat View mode' with a value 'recreate source folder structure', which sounds like exactly what I want, but I need it to work for collections. I thought I might be able to view my collection in Flat View and exploit this option but the Flat View menu items seem to be disabled for collections.

Is there any way I can achieve this?

Thanks in advance for any suggestions.

This is exactly what I was just trying to do. Post Option to Recreate Directory Structure when Copying from Fin seems to suggest it can't be done. Given Dopus does just about everything else, this sure would be handy.
I'm using v10 by the way.

In case its of interest there is a workaround, not as good but probably useable in most instances.
Instead of doing a file find and trying to copy the collected results:

  1. Turn on Copy Filter (in Settings menu)
  2. Select the directories/files to be copied (full unfiltered source)
  3. Click Edit/Copy (or Ctrl-C)
  4. Navigate to target directory
  5. Click Edit/Paste (or Ctrl-V)
    The Copy FIlter should pop up, set the filter using the same criteria you would have used for FIle Find, click Ok.

ddk's copy filter method is probably the best way to do this.

The main problem with giving collections a similar "recreate directory structure" mode as flat view is that with collections there's no definite 'starting point'. In this case you want to include all folders below the roots (or maybe including the root drive letters converted into subdirectories), but in other cases you might want to skip a few levels.

For example, if you do a search within C:\Data\Music and find


you might want to copy those to


but the collection doesn't know the Find was done relative to [b]C:\Data\Music[/b], and even if that information was stored when doing a Find, you're free to add arbitrary files (or the results of additional Find operations) to a collection afterwards which would make that information invalid...

Writing this up gave me an idea, though... Maybe we can do something about this for a future version. Need to think on it a bit more, though.

I can see some of the complications but in essence, whatever the source, we're looking to copy to a relative dir structure in the selected target.

Assume first that all files are from the same starting source, eg. C:\Data\Music
Search returns:

The user is likely to want to either recreate as:
ie. choose recreate structure from beginning (excluding drive or share name) or recreate structure from starting dir of search
You could go one step further and offer up each of the subdirs in the path as a starting point of structure recreation but I reckon 99% will want one of the two I have shown.

So then there's the complication of files added to the collection that don't have \Data\Music\ within their path ie. came from a different search source dir.

  1. If using option "recreate structure from beginning (excluding drive or share name)" its simple, just do exactly that.

So, a search of C:\Data\Music returning:

followed by a search of D:\Other Music returning:
D:\Other Music\AlbumX\Track01.mp3
D:\Other Music\AlbumY\Track01.mp3

would result in:
:: recreate structure from beginning (excluding drive or share name):
\Other Music\AlbumX\Track01.mp3
\Other Music\AlbumY\Track01.mp3

  1. If using option "recreate structure from starting dir of search", then there are several scenarios.

2a) If all files in the collection are from the same source dir, there's no issue.
2b) If files in the collection are made up of files from different source dirs/different searches then you need to choose from two paths. This could be user selectable:

2b-1) Choose which result set in the collection to use, probably based on first file in collection and look at the source dir it came from. Any file in the collection coming from that source can have its dir structure recreated in target dir. Any file in the collection that did NOT come from that same source would revert to being treated as "recreate structure from beginning (excluding drive or share name)".

would result in
:: recreate structure from starting dir of search:
\Other Music\AlbumX\Track01.mp3
\Other Music\AlbumY\Track01.mp3

2b-2) Recreate the structure from the starting dir of search for each file in the collection. You would need to store that info with the collection.

would result in
:: recreate structure from starting dir of search:
\Album1\Track01.mp3 (starting dir=C:\Data\Music, file found=C:\Data\Music\Album1\Track01.mp3)
\Album2\Track01.mp3 (starting dir=C:\Data\Music, file found=C:\Data\Music\Album1\Track01.mp3)
\AlbumX\Track01.mp3 (starting dir=D:\Other Music, file found=D:\Other Music\AlbumX\Track01.mp3)
\AlbumY\Track01.mp3 (starting dir=D:\Other Music, file found=D:\Other Music\AlbumY\Track01.mp3)

  1. If you were to offer more than choice 1 or 2, ie. offering up each of the subdirs in the source path as a starting point of structure recreation, this would get quite problematic where files in the collection came from different source dirs.

So, essentially it boils down to offering two/three options for target structure recreation, and applying some rules if necessary for handling files not adhering to the selected source dir structure.

I didn't look through all different references whether there is a different way to do this, but I found you could do this by using the zip action.

Select all the files in the collection and just make sure to use "Save full file paths" .. then you can unzip it afterwards. Not a real clean way to do it but it allows it to work.