Best way to copy selected directories in directory hierarchy
Moderators: fgagnon, nikos, Site Mods
Best way to copy selected directories in directory hierarchy
I often have to backup users documents and setting directories (ie profiles) as part of my job. Can anyone point me in the right direction on an effecient way to do this with xplorer2 pro?
Here's the scenario. I need to copy a users documents and settings user profile to a backup directory. It would be a subset of the entire directory structure. For example. I would copy a users
MyUserid\Cookies
\Desktop
\LocalSettings\ApplicationData
\Apps
\History
(Excluding) \Temp
(Excluding) \TemporaryInternetFiles
\MyDocuments
\MyRecentDocuments
\StartMenu
Excluding any other directories and files in the windows profile.
Some things I've tried are browse flat, copying to scrap. I'm confused by marking, but maybe this is the way to do it. So far I have been unsuccessful.
Thanks, Alan
Here's the scenario. I need to copy a users documents and settings user profile to a backup directory. It would be a subset of the entire directory structure. For example. I would copy a users
MyUserid\Cookies
\Desktop
\LocalSettings\ApplicationData
\Apps
\History
(Excluding) \Temp
(Excluding) \TemporaryInternetFiles
\MyDocuments
\MyRecentDocuments
\StartMenu
Excluding any other directories and files in the windows profile.
Some things I've tried are browse flat, copying to scrap. I'm confused by marking, but maybe this is the way to do it. So far I have been unsuccessful.
Thanks, Alan
Alan, if you're looking for the best way to backup your data, I think you should use somewhat else tools to do the job.
Personally I crafted a batch file which calls RAR with proper configuration and the whole construction backups all my data the way I want it. And the best thing: it doesn't miss any folder every other time I run it. It's much better and less error prone than do it manually.
Personally I crafted a batch file which calls RAR with proper configuration and the whole construction backups all my data the way I want it. And the best thing: it doesn't miss any folder every other time I run it. It's much better and less error prone than do it manually.
I'm using Xplorer2 - the only file manager that does not suck. Actually, it rocks!
I am a little confused now: just wanted to tell you that "paste->structured scrap clips" is just what you needed, but I can't get it to work any more....strange.
Anyway: try collecting your folders in a scrap, select and copy them. Then you should be able to paste them into your backup location, while keeping the relative folder structure of your user folder intact.
Here I always get a windows error "could not find source item" (its a german OS, so I tried to translate) when I try to do this. But maybe it works for you.
Martin
Anyway: try collecting your folders in a scrap, select and copy them. Then you should be able to paste them into your backup location, while keeping the relative folder structure of your user folder intact.
Here I always get a windows error "could not find source item" (its a german OS, so I tried to translate) when I try to do this. But maybe it works for you.
Martin
i can see many ways such complex file copies can be handled by xplorer2 pro version. You want to copy all c:\documents and settings that includes all user profiles except for certain folders or files
my preferred option would be to use robust copy with exclusion filters. You select c:\documents and settings, hit F5, and define a filter. Say you want to exclude all folders that are called "temp" and "TemporaryInternetFiles". These have a common feature, contain temp in their name, so you can define a filter as follows:
* press clear to empty all fields
* double-click in "Additional rules", pick up the Path column and type "Temp" in the box. Make sure you select not as the rule type
* press ok
since this is a backup task you only need to copy files that were added or changed since last backup, so click on options and click on "overwrite if newer else skip"
now you can start the copy!
this looks like a lot of work but since you can save both the exclusion filter and the backup copy options, and then have them accessible from the history list, this is an effort you only have to do once
this will only run into problems if there is another folder name e.g. TempSomething that you want to be copied. If you get this problem let me know and i'll think of something else
btw i can't see how this can be done with a scrap window and paste structured scrap clips since when you copy "c:\1" this will automatically copy all its subfolders including e.g. c:\1\temp
my preferred option would be to use robust copy with exclusion filters. You select c:\documents and settings, hit F5, and define a filter. Say you want to exclude all folders that are called "temp" and "TemporaryInternetFiles". These have a common feature, contain temp in their name, so you can define a filter as follows:
* press clear to empty all fields
* double-click in "Additional rules", pick up the Path column and type "Temp" in the box. Make sure you select not as the rule type
* press ok
since this is a backup task you only need to copy files that were added or changed since last backup, so click on options and click on "overwrite if newer else skip"
now you can start the copy!
this looks like a lot of work but since you can save both the exclusion filter and the backup copy options, and then have them accessible from the history list, this is an effort you only have to do once
this will only run into problems if there is another folder name e.g. TempSomething that you want to be copied. If you get this problem let me know and i'll think of something else
btw i can't see how this can be done with a scrap window and paste structured scrap clips since when you copy "c:\1" this will automatically copy all its subfolders including e.g. c:\1\temp
I thought he'd pick not the complete user dir, but only those folders he'd need and throw them into a scrap. E.g.nikos wrote:btw i can't see how this can be done with a scrap window and paste structured scrap clips since when you copy "c:\1" this will automatically copy all its subfolders including e.g. c:\1\temp
Code: Select all
/userA
/dir1 <- backup
/dir2
/dir2.1 <- backup
/dir2.2
/dir3
...
Code: Select all
/dir1
/dir2
/dir2.1
[/code]
Answering myself: structured scrap clips obviously only works for files, not for folders. If I copy files contained in different folders it works. If I try to copy folders contained in different parent folders I get an error message.
Is that true? Makes pasting structured scrap clips much less useful, doesn't it?
Is that true? Makes pasting structured scrap clips much less useful, doesn't it?
you may have discovered a bug there, i'll look into it
but that's not the problem I was referring to; say you want to copy a certain folder c:\1 but exclude one of its subfolders c:\1\temp. There's no way you can do that unless you individually put in all subfolders siblings to this temp one. And if you have many of those in many hierarchies it can get tedious
btw the new version allows you to easily flatten folders only by right-dragging the root folder and picking Get subfolders from the context menu
but that's not the problem I was referring to; say you want to copy a certain folder c:\1 but exclude one of its subfolders c:\1\temp. There's no way you can do that unless you individually put in all subfolders siblings to this temp one. And if you have many of those in many hierarchies it can get tedious
btw the new version allows you to easily flatten folders only by right-dragging the root folder and picking Get subfolders from the context menu
ok i think i patched it, back to debug mode for a while!
www.zabkat.com/dbmon.zip (900KB)
this also includes the following changes:
* ctrl+S sends items to miniscrap by default (registry bit to disable)
* new "D" attribute for directories (don't know why i added that )
* saveAs mini-scrap context menu item
www.zabkat.com/dbmon.zip (900KB)
this also includes the following changes:
* ctrl+S sends items to miniscrap by default (registry bit to disable)
* new "D" attribute for directories (don't know why i added that )
* saveAs mini-scrap context menu item
All users,
Note the subtle difference how x2 uses the "save as" command, as compared to how a typical Windows application uses it:
Generally a Windows application modifies a document but does not save it. (It only asks the user whether to save only when exiting.) If the user does not want to disturb the existing document, then he uses the "save as" command to create an edited version of the original document.
In contrast, x2 keeps saving all changes instantly in the current document. So a "save as" command creates an exact copy of the existing document.
So, the main use of this command here is to change the storage path for this cida file (e.g. from C:\Temp\ to the installation folder of x2).
What other uses do you plan for this command?
*****
Second question:
Normally, a windows application switches to the new document created by the "save as" command. The earlier document is kept aside.
Some applications have a variant of this command, called "save a copy", where a copy is saved and the application continues using the current document.
I wonder which variant is more appropriate for x2?
Note the subtle difference how x2 uses the "save as" command, as compared to how a typical Windows application uses it:
Generally a Windows application modifies a document but does not save it. (It only asks the user whether to save only when exiting.) If the user does not want to disturb the existing document, then he uses the "save as" command to create an edited version of the original document.
In contrast, x2 keeps saving all changes instantly in the current document. So a "save as" command creates an exact copy of the existing document.
So, the main use of this command here is to change the storage path for this cida file (e.g. from C:\Temp\ to the installation folder of x2).
What other uses do you plan for this command?
*****
Second question:
Normally, a windows application switches to the new document created by the "save as" command. The earlier document is kept aside.
Some applications have a variant of this command, called "save a copy", where a copy is saved and the application continues using the current document.
I wonder which variant is more appropriate for x2?
Personally I don't plan anything more from it. I just need to move cida from temp to my data folder to keep it safe.narayan wrote:So, the main use of this command here is to change the storage path for this cida file ... What other uses do you plan for this command?
As a side note: it's not a good idea to place MS cida to installation folder. It's a way for problems in multi-user environment (a couple sharing the same computer for instance) and simply doesn't work in LUA situation, because regular users cannot write to Program Files folder.narayan wrote:(e.g. from C:\Temp\ to the installation folder of x2).
From what I see, x2 now behaves exactly as you described and I'm fine with it.narayan wrote:Normally, a windows application switches to the new document created by the "save as" command. The earlier document is kept aside. I wonder which variant is more appropriate for x2?
I'm using Xplorer2 - the only file manager that does not suck. Actually, it rocks!
Thanks for info. Could I get updated software
I had no idea what I was starting! I actually tried the structured copy but it failed with directories.
The reason I want to do this we often have to quickly fix peoples corrupted windows profiles. Often these folks have huge temp and temp internet files dirs. We have found the quickest way to fix corrupted profiles is to make copies of the key directories, Blow away the users profile, recreate the profile and copy key directories back. That is the reason behind the request.
Is there a way I can get a copy of the fix? Would the fix be included in the new version coming out? Thanks so much for all you help and insight.
The reason I want to do this we often have to quickly fix peoples corrupted windows profiles. Often these folks have huge temp and temp internet files dirs. We have found the quickest way to fix corrupted profiles is to make copies of the key directories, Blow away the users profile, recreate the profile and copy key directories back. That is the reason behind the request.
Is there a way I can get a copy of the fix? Would the fix be included in the new version coming out? Thanks so much for all you help and insight.
But the 'fix' addresses multiple scrap clip issue.
The discussion on your problem generally advised to create a custom template in a batch script to run; although you can try with scraps.
oh ... pending discovery/repair of any last minute issues, nikos expects to release the next version tomorrow (includes the aforementioned patch along with other goodies). [/b]
The discussion on your problem generally advised to create a custom template in a batch script to run; although you can try with scraps.
oh ... pending discovery/repair of any last minute issues, nikos expects to release the next version tomorrow (includes the aforementioned patch along with other goodies). [/b]
that's why I love x2!!! Thanks Nikos. Looking forward to the new version!nikos wrote:ps there is indeed a bug with scrap clips and multiple folders, down to m$ ... SHFileOperation doesn't like multiple folders with FOF_MULTIDESTFILES. I'm trying to get a quick fix in
...
ok i think i patched it, back to debug mode for a while!
That is of course true, and I am aware of this. The structure port80 was posting to me seemed to be not too complicated. But I think robust copy with exclusion will work in most cases.nikos wrote:but that's not the problem I was referring to; say you want to copy a certain folder c:\1 but exclude one of its subfolders c:\1\temp. There's no way you can do that unless you individually put in all subfolders siblings to this temp one. And if you have many of those in many hierarchies it can get tedious