After using search, copy files *AND* folder structure
-
marvin_rock
- Posts: 9
- Joined: 05 Jan 2012 14:31
After using search, copy files *AND* folder structure
Okay, so I am SUPER new to XYplorer, and not the most technically proficient. Here's what I'm trying to accomplish.
I have 2 networked drives that I maintain, one is over it's size limit, one has TB's to spare. What I want to do, is perform a search of drive F: (FULL) of any/all files that haven't been touched in over a year (Note: this part is done, I've found 30GB's of files to move)
Take those search results, move them to drive S: (SPACE), with the full folder structure intact.
Example
Search results turns up the following
F:Admin/taskers/MAR2010/file.doc
F:Admin/Private/recognition/BAT/file.xls
F:Admin/SDUP/Maritime/closed/file.ppt
F:T6/APR2010/mot/history/file.mdb
I'd like the copy/paste to perform the following and have them end up like this.
S:Admin/taskers/MAR2010/file.doc
S:Admin/Private/recognition/BAT/file.xls
S:Admin/SDUP/Maritime/closed/file.ppt
S:T6/APR2010/mot/history/file.mdb
What seems to be happening is I copy all the files, and when I paste, it ends up here
S:file.doc
S:file.xls
S:file.ppt
S:file.mdb
I'm REALLY hoping I can automate this, because the search turns up almost 60,000 files in too many to count sub-folders.
I HAVE been able to duplicate the file structure, but I'd still have to manually copy/paste all the files in a dual-pane window. Which is less than ideal.
This is my first post, I'm sure this has been covered, I *DID* search, but I didn't have much luck finding what I was looking for, mostly just requests for a feature similar. Thanks.
I have 2 networked drives that I maintain, one is over it's size limit, one has TB's to spare. What I want to do, is perform a search of drive F: (FULL) of any/all files that haven't been touched in over a year (Note: this part is done, I've found 30GB's of files to move)
Take those search results, move them to drive S: (SPACE), with the full folder structure intact.
Example
Search results turns up the following
F:Admin/taskers/MAR2010/file.doc
F:Admin/Private/recognition/BAT/file.xls
F:Admin/SDUP/Maritime/closed/file.ppt
F:T6/APR2010/mot/history/file.mdb
I'd like the copy/paste to perform the following and have them end up like this.
S:Admin/taskers/MAR2010/file.doc
S:Admin/Private/recognition/BAT/file.xls
S:Admin/SDUP/Maritime/closed/file.ppt
S:T6/APR2010/mot/history/file.mdb
What seems to be happening is I copy all the files, and when I paste, it ends up here
S:file.doc
S:file.xls
S:file.ppt
S:file.mdb
I'm REALLY hoping I can automate this, because the search turns up almost 60,000 files in too many to count sub-folders.
I HAVE been able to duplicate the file structure, but I'd still have to manually copy/paste all the files in a dual-pane window. Which is less than ideal.
This is my first post, I'm sure this has been covered, I *DID* search, but I didn't have much luck finding what I was looking for, mostly just requests for a feature similar. Thanks.
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: After using search, copy files *AND* folder structure
Afaik everything that uses entries of the search result list (like copy / move operations) doesn't respect the path of these files.
If you use the pro version (with scripting support) you could try the following:
Save it as a script (extension: .xys) and invoke it, AFTER
you've made the search and used strg + a (to select all found files).
Try it with a few files first to be sure that it works for you. If it works you could replace the copyas with moveas command in the script or you delete all files manually after copying them.
If you use the pro version (with scripting support) you could try the following:
Code: Select all
$SrcDrive = "F:\";
$DstDrive = "S:\";
// sel a;
$SelectedItemsInclPaths = get("SelectedItemsPathNames", "|");
foreach($Item, "$SelectedItemsInclPaths", "|") {
$FindBS = strpos($Item, "\", -1);
$DstPath = substr($Item, 0, $FindBS);
$DstPath = replace("$DstPath", "$SrcDrive", "$DstDrive", , , 1);
copyas "*.?", "$DstPath", "$Item";
}you've made the search and used strg + a (to select all found files).
Try it with a few files first to be sure that it works for you. If it works you could replace the copyas with moveas command in the script or you delete all files manually after copying them.
One of my scripts helped you out? Please donate via Paypal
-
marvin_rock
- Posts: 9
- Joined: 05 Jan 2012 14:31
Re: After using search, copy files *AND* folder structure
I ran the script after selecting all the search files and got the following error
Error: 5 (00000005)
Desc: Invalid procedure call or argument
Dll: 0
Proc: script_Process
Source: XYplorer
XY ver: 10.50.0000
OS: Windows XP Professional (Service Pack 3), 32-bit
Date: 1/5/2012 9:48:08 AM
I tried copy/pasting it into the "Scripting - Run Script" option, and I also created a .xys file using notepad and loaded that via "Scripting - Load Script File" and got the same issue using both methods.
Error: 5 (00000005)
Desc: Invalid procedure call or argument
Dll: 0
Proc: script_Process
Source: XYplorer
XY ver: 10.50.0000
OS: Windows XP Professional (Service Pack 3), 32-bit
Date: 1/5/2012 9:48:08 AM
I tried copy/pasting it into the "Scripting - Run Script" option, and I also created a .xys file using notepad and loaded that via "Scripting - Load Script File" and got the same issue using both methods.
-
j_c_hallgren
- XY Blog Master
- Posts: 5826
- Joined: 02 Jan 2006 19:34
- Location: So. Chatham MA/Clearwater FL
- Contact:
Re: After using search, copy files *AND* folder structure
Hi and welcome to the XY forums!marvin_rock wrote:Okay, so I am SUPER new to XYplorer, and not the most technically proficient.
This is my first post, I'm sure this has been covered, I *DID* search, but I didn't have much luck finding what I was looking for, mostly just requests for a feature similar. Thanks.
BTW, I'm only responding to the non-technical part of your post and wanted to say thanks for at least trying to find a prior thread that applied! What a few of us forum regulars find irritating are new threads for topics covered by the FAQ's on XY site or those that had very similar threads in the last week or two...now if the appropriate thread was from maybe 2 yrs ago, then not finding it can be much more excused...but know that our feeling is that you're more than welcome to re-open/extend an existing thread from long ago rather than make a brand new one...some forums prefer the later.
I think "strg" is "Ctrl" on our keyboards -- language diff, maybe?
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
-
marvin_rock
- Posts: 9
- Joined: 05 Jan 2012 14:31
Re: After using search, copy files *AND* folder structure
Well I use a few other forums (mostly car related, and one excel board), and I know that's generally a rule for us newbies. Yes, STRG=CTRL, I searched after he posted it, go google!j_c_hallgren wrote:Hi and welcome to the XY forums!marvin_rock wrote:Okay, so I am SUPER new to XYplorer, and not the most technically proficient.
This is my first post, I'm sure this has been covered, I *DID* search, but I didn't have much luck finding what I was looking for, mostly just requests for a feature similar. Thanks.
BTW, I'm only responding to the non-technical part of your post and wanted to say thanks for at least trying to find a prior thread that applied! What a few of us forum regulars find irritating are new threads for topics covered by the FAQ's on XY site or those that had very similar threads in the last week or two...now if the appropriate thread was from maybe 2 yrs ago, then not finding it can be much more excused...but know that our feeling is that you're more than welcome to re-open/extend an existing thread from long ago rather than make a brand new one...some forums prefer the later.
I think "strg" is "Ctrl" on our keyboards -- language diff, maybe?
Still hoping for a solution. I only understand some basic bits of the macro, so I'm not able to deduce where an issue is present for it to not run.
-
nas8e9
- Posts: 2232
- Joined: 21 Jun 2008 14:50
Re: After using search, copy files *AND* folder structure
@marvin_rock: I think you're looking for Rich Copy, which will copy both the entire folder- and file-structure.
The help file has more information, but basically you drag-and-drop the search results with the right button. After releasing the right button, a context menu is shown. By selecting either Rich Move Here, or Rich Copy Here, the entire structure will be moved or copied.
The help file has more information, but basically you drag-and-drop the search results with the right button. After releasing the right button, a context menu is shown. By selecting either Rich Move Here, or Rich Copy Here, the entire structure will be moved or copied.
-
marvin_rock
- Posts: 9
- Joined: 05 Jan 2012 14:31
Re: After using search, copy files *AND* folder structure
nas8e9 wrote:@marvin_rock: I think you're looking for Rich Copy, which will copy both the entire folder- and file-structure.
The help file has more information, but basically you drag-and-drop the search results with the right button. After releasing the right button, a context menu is shown. By selecting either Rich Move Here, or Rich Copy Here, the entire structure will be moved or copied.
...NAILED...IT!!!!
Absolutely perfect, thank you so much!!!!!
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: After using search, copy files *AND* folder structure
For what reason did I write a script, hey? 
Btw, it works fine here marvin_rock, otherwise I wouldn't have posted it, don't know why you got this strange error message.
Btw, it works fine here marvin_rock, otherwise I wouldn't have posted it, don't know why you got this strange error message.
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 67270
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: After using search, copy files *AND* folder structure
Hi marvin_rock,marvin_rock wrote:nas8e9 wrote:@marvin_rock: I think you're looking for Rich Copy, which will copy both the entire folder- and file-structure.
The help file has more information, but basically you drag-and-drop the search results with the right button. After releasing the right button, a context menu is shown. By selecting either Rich Move Here, or Rich Copy Here, the entire structure will be moved or copied.
...NAILED...IT!!!!
Absolutely perfect, thank you so much!!!!!
Rich File Operations are in the app since 12 years (!) now, but people do not seem to know about it, find it, use it. Probably because of the stupid (?) name "Rich Move" and "Rich Copy".
Please help me: What could I have done to make you find it on yourself. Did you look in the Help file? Where did you look? Which keyword should I add to point the next user to Rich Copy?
Thanks and welcome to the club,
Don (admin)
FAQ | XY News RSS | XY X
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: After using search, copy files *AND* folder structure
Is there a reason there's not a Rich Paste option (under Paste Special)?admin wrote:Please help me: What could I have done to make you find it on yourself. Did you look in the Help file? Where did you look? Which keyword should I add to point the next user to Rich Copy?
marvin_rock started the thread mentioning copy/paste so there's little chance they'd stumble over the right-drag menu.
Another thought would be to display the right-drag menu on left-drags by default. It would sure make it easier to find the menu in the first place and showcase some useful advanced features, but it changes a default behavior and users that don't look in the config to discover it can be placed on right-drag might not be converted to sells. Though, adding an item to the menu, "Only show menu on Right-Drags", might help to convert them.
-
admin
- Site Admin
- Posts: 67270
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: After using search, copy files *AND* folder structure
There was some talk about "Rich Paste" about 2 weeks ago (http://www.xyplorer.com/xyfc/viewtopic. ... 105#p67105). I plan to add it. A problem with Rich Paste (compared to dragging from the search results) is that it is unclear which should be the absolute root path to which the folder structure should be related. My idea: one could determine the greatest common path of all items in clipboard and take that as rootpath.TheQwerty wrote:Is there a reason there's not a Rich Paste option (under Paste Special)?admin wrote:Please help me: What could I have done to make you find it on yourself. Did you look in the Help file? Where did you look? Which keyword should I add to point the next user to Rich Copy?
marvin_rock started the thread mentioning copy/paste so there's little chance they'd stumble over the right-drag menu.
Another thought would be to display the right-drag menu on left-drags by default. It would sure make it easier to find the menu in the first place and showcase some useful advanced features, but it changes a default behavior and users that don't look in the config to discover it can be placed on right-drag might not be converted to sells. Though, adding an item to the menu, "Only show menu on Right-Drags", might help to convert them.
FAQ | XY News RSS | XY X
-
admin
- Site Admin
- Posts: 67270
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: After using search, copy files *AND* folder structure
Hmmm, don't like it.TheQwerty wrote:Another thought would be to display the right-drag menu on left-drags by default. It would sure make it easier to find the menu in the first place and showcase some useful advanced features, but it changes a default behavior and users that don't look in the config to discover it can be placed on right-drag might not be converted to sells. Though, adding an item to the menu, "Only show menu on Right-Drags", might help to convert them.
FAQ | XY News RSS | XY X
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: After using search, copy files *AND* folder structure
I'd have thought you'd been doing that for as long as Find allowed searching multiple locations.admin wrote:There was some talk about "Rich Paste" about 2 weeks ago (http://www.xyplorer.com/xyfc/viewtopic. ... 105#p67105). I plan to add it. A problem with Rich Paste (compared to dragging from the search results) is that it is unclear which should be the absolute root path to which the folder structure should be related. My idea: one could determine the greatest common path of all items in clipboard and take that as rootpath.
Adding this will probably help most towards the discovery of Rich-Operations since you'll then have it in the main menu and possibly on the toolbar.
Agreed, but I'm not seeing any other way you can make the right-drag menu discoverable by itself.admin wrote:Hmmm, don't like it.TheQwerty wrote:Another thought would be to display the right-drag menu on left-drags by default. It would sure make it easier to find the menu in the first place and showcase some useful advanced features, but it changes a default behavior and users that don't look in the config to discover it can be placed on right-drag might not be converted to sells. Though, adding an item to the menu, "Only show menu on Right-Drags", might help to convert them.
The Tip of the Day dialog was a nice idea but having it disabled by default defeats the purpose and I question if anyone at all uses the feature. We've done a poor job of keeping it updated ("Updated: 20100203") and it makes no mention of the Rich operations beyond:
Offering a little tour of XY on first-run or popping-up tips the first time a user performs certain actions would be quite useful, but that's a pretty big undertaking which could just as easily be annoying.Drag & drop using the right button to get a menu with lot of useful options.
-
admin
- Site Admin
- Posts: 67270
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: After using search, copy files *AND* folder structure
No, with multiple locations search Rich Copy recreates the full path (incl. even the drive letter) in the target.TheQwerty wrote:I'd have thought you'd been doing that for as long as Find allowed searching multiple locations.admin wrote:There was some talk about "Rich Paste" about 2 weeks ago (http://www.xyplorer.com/xyfc/viewtopic. ... 105#p67105). I plan to add it. A problem with Rich Paste (compared to dragging from the search results) is that it is unclear which should be the absolute root path to which the folder structure should be related. My idea: one could determine the greatest common path of all items in clipboard and take that as rootpath.
FAQ | XY News RSS | XY X
-
j_c_hallgren
- XY Blog Master
- Posts: 5826
- Joined: 02 Jan 2006 19:34
- Location: So. Chatham MA/Clearwater FL
- Contact:
Re: After using search, copy files *AND* folder structure
Agree that this isn't as well used as it maybe could be and a bit of "freshening up" might help, even if minimally done.TheQwerty wrote:The Tip of the Day dialog was a nice idea but having it disabled by default defeats the purpose and I question if anyone at all uses the feature. We've done a poor job of keeping it updated ("Updated: 20100203") and it makes no mention of the Rich operations beyond:
Yup! I find those type of things annoying and tend to turn them off right away, but on some little used appl's, I leave them on.TheQwerty wrote:Offering a little tour of XY on first-run or popping-up tips the first time a user performs certain actions would be quite useful, but that's a pretty big undertaking which could just as easily be annoying.
I just took a look at XY site on the page that I suspect many new users might have seen:admin wrote:Please help me: What could I have done to make you find it on yourself. Did you look in the Help file? Where did you look? Which keyword should I add to point the next user to Rich Copy?
http://www.xyplorer.com/tour/index.php
And on that list of items, I see some that are typical/common to any/most FM so I'd put those at bottom of that list for starters...Mini Tree, Catalog, POM should be at top since they are unique...maybe change the sub-header to "Take the tour through some of XYplorer's special features!" or such, and then put another similar sub-header before the rest?
Now, notice what is NOT on that page: Yup, that's right...RICH COPY and/or RICH FILE OPS!
It should be there and link to http://www.xyplorer.com/product.htm#richops
BTW, that might well benefit from a small/partial screen snapshot or two to help explain it.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
XYplorer Beta Club