Page 1 of 2
Folder Copy w/sub levels.
Posted: 08 Jan 2011 00:20
by timhatz
I was able to do a folder only copy, but it did not build the sub folders in that folder, is there a way to tell XY to copy these folders and any subfolders, but not the actual files in the folders.
Thanks, Tim
Re: Folder Copy w/sub levels.
Posted: 08 Jan 2011 01:09
by nas8e9
timhatz wrote:I was able to do a folder only copy, but it did not build the sub folders in that folder, is there a way to tell XY to copy these folders and any subfolders, but not the actual files in the folders.
Thanks, Tim
From the help file:
To do a Rich Copy, drag the selected files from the find results list to the destination in Tree using the right mouse button: on drop, a popup menu will give you the choice between normal and rich operations.
The popup menu will show the command Create Branch(es) Here; that should do it.
Re: Folder Copy w/sub levels.
Posted: 08 Jan 2011 11:10
by tomuser
Paste Special->Paste Folder Structure
Re: Folder Copy w/sub levels.
Posted: 08 Jan 2011 11:53
by admin
nas8e9 wrote:timhatz wrote:I was able to do a folder only copy, but it did not build the sub folders in that folder, is there a way to tell XY to copy these folders and any subfolders, but not the actual files in the folders.
From the help file:
To do a Rich Copy, drag the selected files from the find results list to the destination in Tree using the right mouse button: on drop, a popup menu will give you the choice between normal and rich operations.
The popup menu will show the command Create Branch(es) Here; that should do it.
Note that
Rich Copy is only for search results.
Create Branch(es) Here is probably what you want (drag'n'drop context menu).
Or, copy the folder to the clipboard (select folder, then Ctrl+C), then goto the target and do menu
Edit / Paste Special / Paste Folder Structure.
Re: Folder Copy w/sub levels.
Posted: 08 Jan 2011 12:01
by nas8e9
admin wrote:Note that Rich Copy is only for search results.
Create Branch(es) Here is probably what you want (drag'n'drop context menu).
Or, copy the folder to the clipboard (select folder, then Ctrl+C), then goto the target and do menu Edit / Paste Special / Paste Folder Structure.
@admin and @tomuser: thank you. I suffered a case of being in the general vicinity but no nearer than that

.
Re: Folder Copy w/sub levels.
Posted: 11 Jan 2011 00:00
by timhatz
Paste folder structure worked great. Thank you!
Re: Folder Copy w/sub levels.
Posted: 20 Mar 2011 14:39
by GamaRex
Is it possible to copy the folder structure to the clipboard to paste as text? I'd like to keep a record of folder structure, and possibly add it to multiple drives using the New Folders dialog. I would want to copy the paths using folders rather than files, since I'd want unique results, not a folder for each file found or selected. Thanks.
Re: Folder Copy w/sub levels.
Posted: 20 Mar 2011 14:55
by admin
GamaRex wrote:Is it possible to copy the folder structure to the clipboard to paste as text? I'd like to keep a record of folder structure, and possibly add it to multiple drives using the New Folders dialog. I would want to copy the paths using folders rather than files, since I'd want unique results, not a folder for each file found or selected. Thanks.
Yes, run this script line through the address bar:
Code: Select all
folderreport("dirs", "clipboard", ,"r");
It will copy a report of the current folder structure to the clipboard. Returned are absolute paths. To use it in the New Folders dialog you will have to edit the result (cut the left ends to get relative paths).
Re: Folder Copy w/sub levels.
Posted: 20 Mar 2011 17:02
by Stefan
admin wrote:GamaRex wrote:Is it possible to copy the folder structure to the clipboard to paste as text? I'd like to keep a record of folder structure, and possibly add it to multiple drives using the New Folders dialog. I would want to copy the paths using folders rather than files, since I'd want unique results, not a folder for each file found or selected. Thanks.
Yes, run this script line through the address bar:
Code: Select all
folderreport("dirs", "clipboard", ,"r");
It will copy a report of the current folder structure to the clipboard. Returned are absolute paths. To use it in the New Folders dialog you will have to edit the result (cut the left ends to get relative paths).
More complete example:
Code: Select all
$colFullPath = folderreport("dirs", "r", , "r");
$colRelativePath = replace($colFullPath, "<curpath>\");
msg $colRelativePath;
copytext $colRelativePath; //to clipboard
Re: Folder Copy w/sub levels.
Posted: 20 Mar 2011 17:17
by admin
The latest BETA v9.90.0505 has this:
Code: Select all
folderreport("dirsrel", "clipboard", , "r");
Re: Folder Copy w/sub levels.
Posted: 20 Mar 2011 17:28
by GamaRex
I'm afraid I'm in new territory here. This sounds like what I want to do, but I get only errors when I try either script.
I pasted the first code into the address bar and clicked Address Bar Go:
folderreport("dirs", "clipboard", ,"r");
I get an error:
The location or item you have selected could not be found:
D:\Program Files\XYplorer\folderreport("dirs", "clipboard", ,"r");
I tried the other example, pasting it into Run Script
$colFullPath = folderreport("dirs", "r", , "r");
$colRelativePath = replace($colFullPath, "<curpath>\");
msg $colRelativePath;
copytext $colRelativePath; //to clipboard
and it gives an error:
folderreport("dirs", "r", , "r");
I'm using version 9.80.0100.
I assume I'm missing a variable or some other essential script element. I'm sure the problem is in my ignorance of scripting.
Re: Folder Copy w/sub levels.
Posted: 20 Mar 2011 17:33
by Stefan
@GamaRex
1.
i can't explain the whole story well right now, but you have to prefix the
addressbar script by two colons:
Code: Select all
Address bar [::folderreport("dirs", "clipboard", ,"r"); ]
2.
for an script you have to know the rules.
f.ex.: all lines after the first one have to be indented (your script should looks like mine)
HTH?
Re: Folder Copy w/sub levels.
Posted: 20 Mar 2011 17:34
by admin
Ah, mea culpa!! I forgot the :: at the beginning:
Code: Select all
::folderreport("dirsrel", "clipboard", , "r");
Re: Folder Copy w/sub levels.
Posted: 20 Mar 2011 17:36
by Stefan
GamaRex wrote:
I'm using version 9.80.0100.
I can't say for sure, but this could the problem... folderreport() is relative new implemented.
Check out the XY history.
EDIT:
Code: Select all
v9.90.0205 - 2011-02-04 12:38
* SC folderreport enhanced:
type:
dirs: List of subfolders
Re: Folder Copy w/sub levels.
Posted: 20 Mar 2011 17:37
by j_c_hallgren
GamaRex wrote:I'm using version 9.80.0100.
I assume I'm missing a variable or some other essential script element. I'm sure the problem is in my ignorance of scripting.
9.80.0100 in XY terms is starting to get close to ancient history!
When possible, always use the latest beta, ok? That's always the best thing to try here...though I see that Don has admitted a minor 'oops'.