Copying modified files only

  • Thread starter Thread starter David
  • Start date Start date
D

David

I want to copy files to a backup directory but do not
want to overright files that have not changed - simply to
save time. If a folder contains a file of the same name I
currently get the request to overright all or none. How
can I configure Windows 2000 to overight only files that
are dated later than those in the directory to which I am
copying them? This would make backup much quicker. I have
used the backup facility in the past but found I could
not restore the files on a new machine following hard
disk failure so have been somewhat reluctant to use it
since. Any help would be appreciated.

David
 
David,

How are you backing your files up? If you are using xcopy, then the /d
switch should only copy files that have been changed since the last time
they were copied & /y switch should suppress any prompts. Alternatively you
could use the /m switch to only copy files with the archive bit set, then
reset it. Type xcopy /? at a command prompt to find out about all the
switches & do some testing.

Alternatively, Windows 2000 provides Microsoft Backup which can perform a
backup of files to an archive based on files that have changed or do not
exist in the archive, etc.
 
Chris
I am working in Explorer and simply dragging the folder
icon across to the target directory. I am not too
familiar with using commands. Would the following be
correct?
Start/Run/Command/to get the entry window and then type
copy foldername/d:z:\ where /d is the switch and z the
target directory.

When I used Microsoft Backup recently it put all the
files in a backup folder in which I could not locate
specific files. I simply want a mirror image of my
current directory - not compressed or anything else
David
 
Check out ROBOCOPY which is a small DOS utility in the W2K Server Resource Kit. (which I think you have to purchase)

Check: http://www.microsoft.com/windows/reskits/default.asp

Or maybe XCOPY will do what you want.

--
Always try the MS KB first before posting.
MS KB: http://support.microsoft.com/default.aspx?scid=fh;EN-US;KBHOWTO
And the answer could have already been posted, so try searching this and other newsgroups first.
----
Mark-Allen Perry
ALPHA Systems
Marly, Switzerland
mark-allen_AT_mvps_DOT_org

I want to copy files to a backup directory but do not
want to overright files that have not changed - simply to
save time. If a folder contains a file of the same name I
currently get the request to overright all or none. How
can I configure Windows 2000 to overight only files that
are dated later than those in the directory to which I am
copying them? This would make backup much quicker. I have
used the backup facility in the past but found I could
not restore the files on a new machine following hard
disk failure so have been somewhat reluctant to use it
since. Any help would be appreciated.

David
 
That's right, MS Backup will create an 'archive' file, a bit like a Winzip
file containing an image of the backed up files.

If you need a 'mirror'ed copy of your files, then a command line utility is
more appropriate. You start the command prompt by typing 'cmd' in the
'Run...' box. If you type 'xcopy /?' in the command prompt, you will see the
available switches for the xcopy utility displayed. To use the utility, you
type 'xcopy' followed by the arguments & switches to make it do what you
want it to. For example:

If I wanted to copy all files in c:\myfolder\ to another folder on the d:
drive called 'myotherfolder', I would type:

xcopy c:\myfolder\*.* d:\myotherfolder\*.*

Where *.* represents all filenames with an extension like .doc, etc. If I
wanted to suppress any overwrite prompts, I would type:

xcopy c:\myfolder\*.* d:\myotherfolder\*.* /y

If I wanted to do all that & only copy files that have changed or been
created, I would type:

xcopy c:\myfolder\*.* d:\myotherfolder\*.* /d /y

You could also take this a step further & put this in a text file with a
..bat file extension & schedule it to run if you were feeling extra lazy ;-).
 
Mark-Allen Perry said:
Check out ROBOCOPY which is a small DOS utility in the W2K
Server Resource Kit. (which I think you have to purchase)

Check: http://www.microsoft.com/windows/reskits/default.asp
Hi

Robocopy.exe is in the free Windows Server 2003 Resource Kit (will work
fine on Win2k as well):

http://www.microsoft.com/downloads/...69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en

(The kit will install on WinXP or later, the individual files can
then be copied to another computer if needed)


See rktools.chm and robocopy.doc for documentation for Robocopy.exe.
 
Excellent! I saw a different page which said you had to pay for it.

Many thanks, Torgeir.

--
Always try the MS KB first before posting.
MS KB: http://support.microsoft.com/default.aspx?scid=fh;EN-US;KBHOWTO
And the answer could have already been posted, so try searching this and other newsgroups first.
----
Mark-Allen Perry
ALPHA Systems
Marly, Switzerland
mark-allen_AT_mvps_DOT_org

Check out ROBOCOPY which is a small DOS utility in the W2K
Server Resource Kit. (which I think you have to purchase)

Check: http://www.microsoft.com/windows/reskits/default.asp
Hi

Robocopy.exe is in the free Windows Server 2003 Resource Kit (will work
fine on Win2k as well):

http://www.microsoft.com/downloads/...69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en

(The kit will install on WinXP or later, the individual files can
then be copied to another computer if needed)


See rktools.chm and robocopy.doc for documentation for Robocopy.exe.
 
Mark-Allen Perry said:
Excellent! I saw a different page which said you had to pay for it.
Hi

You are correct for the W2K Server Resource Kit, that one you need
to pay for.
 
Chris
Could I seek your advice one more time. I wrote xcopy g:
z:/s/d/y and it copied folders and files when I add new
folders and files or modifed files except that when I
modified my web pages, it doesn't copy them from g to z.
Why would it not work for all folders and files? Even
tried xcopy g: z:/s/d/y/a/r but the files refused to be
copied. What am I doing wrong?
David
 
Hi David,

When you say "I modified my web pages", do you mean that you have a website
stored in g: & you want a copy of it in z:? Have you also been typing spaces
between your arguments & switches - i.e.

xcopy<space>g:<space>z:<space>/s<space>/d<space>/y

?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top