Copy files of collection in one folder

Hello,

I have a collection with sub collections, for example

  • MyCollection
    • SubCollection1
    • SubCollection2

All files of this collection I want copy in the same target directory without folders. Because a collection has no flat view, I copy first the collection with files in folders in a temporary folder.

c:\temp\allfiles\MyCollection\SubCollection1\file1
..
c:\temp\allfiles\MyCollection\SubCollection1\fileN
c:\temp\allfiles\MyCollection\SubCollection2\otherFile1
..
c:\temp\allfiles\MyCollection\SubCollection2\otherFileN

Then I set this folder to flatview and copy to the destination. In the destination I should have all files without any folder.

c:\temp\destination\file1
..
c:\temp\destination\fileN
c:\temp\destination\otherFile1
..
c:\temp\destination\otherFile1

So I have try this:

Copy "coll://MyCollection" To "C:\temp\allFiles\"
GO "C:\temp\allFiles\"
Set FLATVIEW=mixednofolders
Copy FLATVIEWCOPY=single "C:\temp\allFiles\" To "C:\temp\destination\"
Set FlatVIEW=off

But finally i have still all files in a folder. When I copy with Dopus (without internal commands) from "allfiles" to "destination" in flatview it works fine.

What I make wrong?

My first post missed some "*" (but still not working correct)

Copy "coll://MyCollection\*" To "C:\temp\allFiles\"
GO "C:\temp\allFiles\"
Set FLATVIEW=mixednofolders
Copy FLATVIEWCOPY=single "C:\temp\allFiles\*" To "C:\temp\destination\"
Set FlatVIEW=off

I don't know if this will happen or not, but what happens when you leave the last line out of the script? (Try removing "Set FlatVIEW=off".)

Good idea... but not works :frowning:

Remarkable is that also the option FLATVIEWCOPY=ask is ignored.
Maybe this is a bug in Dopus?

You may need to select everything while in flat view ("Select All") and then run the Copy command with just the destination folder specified, not the source. Otherwise, you're telling the copy command to copy a specific folder, and it will ignore the source lister, and its flat-view state.

Taking a step back, though: What is generating the collections in the first place? There might be a better way to do the whole thing.

That it is! With "Select All" I have also try. But the copy command I have still specified the source and this was my mistake.

I think there is no better way because the collection I have generate manually.

Thanks