win file attribute questions

B

Brad

I have written an x-copy statement in a batch file to copy files from an WIN
2k pro workstation to a USB hard drive. The files that I am copying are
from a network share and the share is a WIN NT 4.0 wks. I then transport
these files to a remote location and restore them to a XP machine. I setup
the xcopy statements with /d so files that have not changed will not be
copied. Everytime I do this something changes with the file attributes and
instead of checking all files that have changed it overwrites them like it
doesn't even see them. This has taken a 10 GB backup from two minutes to
twenty-five. Anybody got any ideas.



Thanks,



Brad
 
P

Pegasus \(MVP\)

Brad said:
I have written an x-copy statement in a batch file to copy files from an WIN
2k pro workstation to a USB hard drive. The files that I am copying are
from a network share and the share is a WIN NT 4.0 wks. I then transport
these files to a remote location and restore them to a XP machine. I setup
the xcopy statements with /d so files that have not changed will not be
copied. Everytime I do this something changes with the file attributes and
instead of checking all files that have changed it overwrites them like it
doesn't even see them. This has taken a 10 GB backup from two minutes to
twenty-five. Anybody got any ideas.



Thanks,



Brad

If you type xcopy /? at the Command Prompt then you will see that
the /d switch ensures that only newer files are copied. This switch
does NOT affect the archive attribute.

What you're after is the /a or the /m switch.
 
B

Brad

Maybe I didn't make myself totally clear. I am using the /d so that I don't
have to keep copying old data files that are less recent than changes. It
keeps rewriting these over and over. Any suggestions.
 
P

Pegasus \(MVP\)

Your post has the word "attribute" in its subject line,
suggesting that you wanted to work with file attributes.
Now now say that you do not necessarily want to work
with attributes. You therefore have two choices:

- Use the /d switch. If you do then xcopy will not copy
source files that are older than the files in the target folder.
- Use the /m switch. If you do then xcopy will copy
only those files that were added or modified since the
last xcopy action.

There is a trap when using the /d switch: If the OS in
the source PC is different from the OS in the target PC
then the file time stamps may have a different granularity,
and files may get copied even though they appear to have
the same time stamp. I think xxcopy.exe (downloadable
from the Internet) avoids this trap.

You also need to ensure that the time zones are the
same on both PCs.
 

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

Top