Page 1 of 2
How do you copy files w/paths to another folder
Posted: 21 Dec 2011 05:21
by saterbear
Here is my scenario:
1. Do a search on a folder + subfolders for all files with ReadOnly attribute = no
2. I want to copy that list with folders intact (i.e. there may be 2 instances of abc.txt, just in different folders) to another folder (e.g. C:\Backup\Today)
3. I'm sure it is probably easy - I just couldn't figure it out.
4. If someone knows the answer and can also show me a script for it, my Christmas will be more merrier.
Thanks.
Re: How do you copy files w/paths to another folder
Posted: 21 Dec 2011 08:21
by j_c_hallgren
Hi and welcome to the XY forums!
Not sure if I understood you fully but for item #1, when you're on File Find tab in Info Panel, look at the Attributes tab and check the "Not Read-Only" box...is that what you wanted?
For item #2, maybe what you're wanting is Rich Copy as described in
http://www.xyplorer.com/product.htm#richops as your request seems similar to this thread:
http://www.xyplorer.com/xyfc/viewtopic.php?f=3&t=7189
Re: How do you copy files w/paths to another folder
Posted: 22 Dec 2011 22:21
by saterbear
The RichCopy is what I was looking for - very cool. I wish it was accessible via menu means rather than just drag-drop though.
Re: How do you copy files w/paths to another folder
Posted: 23 Dec 2011 01:28
by serendipity
saterbear wrote:The RichCopy is what I was looking for - very cool. I wish it was accessible via menu means rather than just drag-drop though.
It is available via menu.
1) menu Edit> Paste Special>Paste Folder Structure
2) Right-click on list>Paste Special>Paste Folder Structure
Other options:
Go to menu Tools>Customize Keyboard Shortcuts>Edit>Paste Folder Structure and you'll see the command ID: "#209" on one of the buttons below.
1) You can use that ID such as typing "::#209" in address bar.
2) or include it in catalog.
3) or create a toolbar icon.
4) or assign shortcut from Customize Keyboard Shortcuts.
there you go: 6 more ways to do what you asked for. 
Sorry, I read that wrong. The only other way is to use scripting, but once you have the script, you can access it as explained above with a different command ID for that script.
Re: How do you copy files w/paths to another folder
Posted: 23 Dec 2011 09:42
by admin
But "Paste Folder Structure" does not copy any files.
Re: How do you copy files w/paths to another folder
Posted: 23 Dec 2011 17:22
by serendipity
admin wrote:But "Paste Folder Structure" does not copy any files.
Oh right.

. So seems like only other way is to us script command copyto.
Re: How do you copy files w/paths to another folder
Posted: 23 Dec 2011 18:12
by admin
Yes, I don't see another way to define the rootpath for the rich copy.
PS: Okay, one could determine the greatest common path of all items in clipboard and take that as rootpath. This would be Rich Paste. Maybe not even that bad an idea... hmm...
Re: How do you copy files w/paths to another folder
Posted: 23 Dec 2011 21:49
by serendipity
admin wrote:Yes, I don't see another way to define the rootpath for the rich copy.
PS: Okay, one could determine the greatest common path of all items in clipboard and take that as rootpath. This would be Rich Paste. Maybe not even that bad an idea... hmm...
Yeah, "Rich paste" sounds like a good idea to deal with this. Or maybe just put it under CKS>Miscellaneous and those who need it can assign a key to it.
Re: How do you copy files w/paths to another folder
Posted: 09 Jan 2012 20:51
by admin
I think I found something better. The next version will have Auto Rich File Operations. Any copy/move operation (drop, paste, to new subfolder, etc.) will check whether its direct sources are "rich" (= come from more than one folder), and then offer to do a Rich Copy or Move instead of the standard flat operation (where things might collide/merge). Cool, and without adding anything to the UI.
Re: How do you copy files w/paths to another folder
Posted: 09 Jan 2012 20:53
by highend
will check whether its direct sources are "rich" (= come from more than one folder), and then offer to do a Rich Copy or Move instead of the standard flat operation
That's really a cool way to implement it

Re: How do you copy files w/paths to another folder
Posted: 09 Jan 2012 20:58
by serendipity
admin wrote:I think I found something better. The next version will have Auto Rich File Operations. Any copy/move operation (drop, paste, to new subfolder, etc.) will check whether its direct sources are "rich" (= come from more than one folder), and then offer to do a Rich Copy or Move instead of the standard flat operation (where things might collide/merge). Cool, and without adding anything to the UI.
NICE!
Re: How do you copy files w/paths to another folder
Posted: 09 Jan 2012 21:12
by Stefan
admin wrote:I think I found something better. The next version will have Auto Rich File Operations. Any copy/move operation (drop, paste, to new subfolder, etc.) will check whether its direct sources are "rich" (= come from more than one folder), and then offer to do a Rich Copy or Move instead of the standard flat operation (where things might collide/merge). Cool, and without adding anything to the UI.
1.)
Don> (= come from more than one folder)
IOW: come from an
sub-folder, and not "more than one folder are selected". Right ?
2.)
I wanted to ask this but i think your new feature will handle that too, isn't it?
When i d&d a file and use ctx menu "Copy/Move here to New Subfolder..."
would it be possible to provide the full source path
as addition to the drop-down of "folder name or subpath" too?
3.) Hint/Reminder
Maybe this all is somehow code-related to "Paste As Zero-Byte Clone" :
Post subject: clone file structure here, Posted: 05 Oct 2011
Re: How do you copy files w/paths to another folder
Posted: 09 Jan 2012 22:27
by admin
Stefan wrote:admin wrote:I think I found something better. The next version will have Auto Rich File Operations. Any copy/move operation (drop, paste, to new subfolder, etc.) will check whether its direct sources are "rich" (= come from more than one folder), and then offer to do a Rich Copy or Move instead of the standard flat operation (where things might collide/merge). Cool, and without adding anything to the UI.
1.)
Don> (= come from more than one folder)
IOW: come from an
sub-folder, and not "more than one folder are selected". Right ?
2.)
I wanted to ask this but i think your new feature will handle that too, isn't it?
When i d&d a file and use ctx menu "Copy/Move here to New Subfolder..."
would it be possible to provide the full source path
as addition to the drop-down of "folder name or subpath" too?
3.) Hint/Reminder
Maybe this all is somehow code-related to "Paste As Zero-Byte Clone" :
Post subject: clone file structure here, Posted: 05 Oct 2011
1) No, not really. A "rich situation" is one where a flat copy/move could lead to collisions. This can only happen when more than one item is copied/moved, and when at least two of those source items are not in the same location.
2) No, this is not related.
3) No, this would need a different approach. It's on my list but low prio.
Re: How do you copy files w/paths to another folder
Posted: 10 Jan 2012 09:34
by admin
admin wrote:I think I found something better. The next version will have Auto Rich File Operations. Any copy/move operation (drop, paste, to new subfolder, etc.) will check whether its direct sources are "rich" (= come from more than one folder), and then offer to do a Rich Copy or Move instead of the standard flat operation (where things might collide/merge). Cool, and without adding anything to the UI.
When I upload the new feature today, please help me with the wording of the dialog. I think it could need it...
For testing simply drag some items from a recursive search, i.e. two or more items from different folders, to a temp folder. Or Copy/Paste those items.
Re: How do you copy files w/paths to another folder
Posted: 11 Jan 2012 15:56
by admin
admin wrote:admin wrote:I think I found something better. The next version will have Auto Rich File Operations. Any copy/move operation (drop, paste, to new subfolder, etc.) will check whether its direct sources are "rich" (= come from more than one folder), and then offer to do a Rich Copy or Move instead of the standard flat operation (where things might collide/merge). Cool, and without adding anything to the UI.
When I upload the new feature today, please help me with the wording of the dialog. I think it could need it...
For testing simply drag some items from a recursive search, i.e. two or more items from different folders, to a temp folder. Or Copy/Paste those items.
So, the wording of the "Auto Rich File Operations" ("Rich Copy?" ...) dialog is okay?