[<<]Message[>>]    [<<]Author[>>]    [<<]Subject        [<<]Thread    

Number : 7160 Date : 2004-02-04 Author : Chaz Cone Subject : Re: backup of changed files Size(KB) : 6
--=====================_746600156==.ALT Content-Type: text/plain; charset="us-ascii"; format=flowed At 10:24 AM 2/3/2004, Mike Hazard wrote: >When using xxcopy to backup files what switches are used to pickup files >that have been changed. >Thanks Mike, you should really read the various XXCOPY tech bulletins; there are a lot of them and together they answer most questions about this very powerful program. http://www.xxcopy.com/#tbul Particularly XXTB #11 (http://www.xxcopy.com/xxcopy11.htm) has many common usages (of which yours is perhaps the most wanted by users just discovering XXCOPY). I've always thought that there should be a TSB that directly addresses this most common use for XXCOPY. While XXCOPY has a enormous number of switches that enable it to perform a myriad of complex copying tasks, I think most new users want just what you asked for: "How can I copy those files that are new or have changed since the last time I did this?" If you want to duplicate an entire disk drive to another, copying only those files that are new or later in time, the syntax is: xxcopy c:\ d:\ /clone That's it. When this is done the first time, you'll have a duplicate of C: on D:. Any files or folders on D: that don't exist on C: will be deleted SO BE CAREFUL! The next time you run this, only those files on C: that are new or have a later timestamp than those on D: will be copied so it will be much faster. If you want to do the same thing as above but don't want the entire hard disk copied you can use this syntax: xxcopy c:\src\ d:\dest\ /clone where "src" is a folder name on C: and "dst" is a folder name on D:; for example: xxcopy "c:\my documents\" "d:\my documents\" /clone would clone the "C:\My documents" folder and all subfolders to the same structure on D: (the double quotes are needed in this example because of the embedded blank in the "My documents" folder name). The trailing backslash should be used to make certain that xxcopy knows you're referring to folders and not files by that name. One last common problem. If the file system on C: is different than that on D: (for example, FAT32 on one and NTFS on the other) you might want to add the "/ff" switch. This accounts for slight variation in time stamp between different file systems. I've always thought that /ff should be a part of the "/clone" macro but there may be cases where it wouldn't be advisable (though I can't think of any). So in both above examples I personally would use the "/clone/ff" switch string to do the job. Finally, you might want to do this (backup new and changed files from one place to another) but NOT want to delete files on the destination that don't exist on the source. It's easy. Just add the "/z0" switch and that will modify the "/clone" switch function to leave such files on the destination. Mike, this is only a fraction of 1% of the flexibility offered by XXCOPY -- but I believe it is THE most common use of this tool. Chaz --=====================_746600156==.ALT Content-Type: text/html; charset="us-ascii" At 10:24 AM 2/3/2004, Mike Hazard wrote: When using xxcopy to backup files what switches are used to pickup files that have been changed. Thanks Mike, you should really read the various XXCOPY tech bulletins; there are a lot of them and together they answer most questions about this very powerful program. http://www.xxcopy.com/#tbul Particularly XXTB #11 (http://www.xxcopy.com/xxcopy11.htm) has many common usages (of which yours is perhaps the most wanted by users just discovering XXCOPY). I've always thought that there should be a TSB that directly addresses this most common use for XXCOPY.  While XXCOPY has a enormous number of switches that enable it to perform a myriad of complex copying tasks, I think most new users want just what you asked for: "How can I copy those files that are new or have changed since the last time I did this?"  If you want to duplicate an entire disk drive to another, copying only those files that are new or later in time, the syntax is: xxcopy c:\  d:\  /clone That's it.  When this is done the first time, you'll have a duplicate of C: on D:.  Any files or folders on D: that don't exist on C: will be deleted  SO BE CAREFUL!  The next time you run this, only those files on C: that are new or have a later timestamp than those on D: will be copied so it will be much faster. If you want to do the same thing as above but don't want the entire hard disk copied you can use this syntax: xxcopy c:\src\  d:\dest\  /clone where "src" is a folder name on C: and "dst" is a folder name on D:; for example: xxcopy "c:\my documents\"   "d:\my documents\"  /clone would clone the "C:\My documents" folder and all subfolders to the same structure on D: (the double quotes are needed in this example because of the embedded blank in the "My documents" folder name).  The trailing backslash should be used to make certain that xxcopy knows you're referring to folders and not files by that name. One last common problem.  If the file system on C: is different than that on D: (for example, FAT32 on one and NTFS on the other) you might want to add the "/ff" switch.  This accounts for slight variation in time stamp between different file systems.  I've always thought that /ff should be a part of the "/clone" macro but there may be cases where it wouldn't be advisable (though I can't think of any). So in both above examples I personally would use the "/clone/ff" switch string to do the job. Finally, you might want to do this (backup new and changed files from one place to another) but NOT want to delete files on the destination that don't exist on the source.  It's easy.  Just add the "/z0" switch and that will modify the "/clone" switch function to leave such files on the destination. Mike, this is only a fraction of 1% of the flexibility offered by XXCOPY -- but I believe it is THE most common use of this tool. Chaz --=====================_746600156==.ALT--
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.