XCOPY Bug In "/D" Option


S

Stewart Berman

Windows XP Pro SP2

I have a scheduled job that runs a command file that is supposed to copy all new and updated files
from a partition on my hard drive to network drive. The command I use is:

XCOPY "I:\*.*" "N:\INSTALL\" /D /E /V /C /I /Y >> C:\Build\Backup\BackupBuild.log

The job is scheduled to run daily.

Unfortunately XCOPY is ignoring the /D and instead of only copying new and updated files it is
copying almost all of them.

The network drive is a Western Digital Net Center drive that directly connects to my LinkSys router.

The dates shown (after backup) for a file that was copied are:

Source Drive:
Created: Sunday, December 10, 2006, 7:15:14 PM
Modified: Monday, June 27, 2005, 12:20:45 AM
Accessed: Today, May 12, 2007, 12:25:07 PM

NetCenter Drive:
Created: Monday, June 27, 2005, 12:20:46 AM
Modified: Monday, June 27, 2005, 12:20:46 AM
Accessed: Today, May 12, 2007, 12:28:44 PM

A file that was not copied has these dates:

Source Drive:
Created: Sunday, December 10, 2006, 7:15:14 PM
Modified: Monday, June 27, 2005, 12:20:45 AM
Accessed: Today, May 12, 2007, 12:25:07 PM

NetCenter Drive:
Created: Monday, June 27, 2005, 12:20:46 AM
Modified: Monday, June 27, 2005, 12:20:46 AM
Accessed:Today, May 12, 2007, 12:33:50 PM

I assume the Accessed date is due to viewing the properties.

It is obvious that the Created date is wrong on the NetCenter drive but it can't be the source of
the problem as the second file would have been copied if that was the case.

It is also obvious that the Modified date is being copied. There appears to be a difference in the
way the date/time is stored as the NetCenter drive has a one second later date. But that should
keep the file from being copied as it is later than the source drive date/time.

Is there a know problem in using XCOPY with network attached storage?
 
Ad

Advertisements

W

Wesley Vogel

XCOPY

/d[:mm-dd-yyyy]
Copies source files changed on or after the specified date only. If you do
not include a mm-dd-yyyy value, xcopy copies all Source files that are newer
than existing Destination files. This command-line option allows you to
update files that have changed.

For XCOPY HELP paste the following line into Start | Run and click OK...

hh ntcmds.chm::/xcopy.htm

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
Ad

Advertisements

S

Stewart Berman

I think you missed:

It is not copying files that are newer than existing destination files. It is copying almost all of
the files every night.



Wesley Vogel said:
XCOPY

/d[:mm-dd-yyyy]
Copies source files changed on or after the specified date only. If you do
not include a mm-dd-yyyy value, xcopy copies all Source files that are newer
than existing Destination files. This command-line option allows you to
update files that have changed.

For XCOPY HELP paste the following line into Start | Run and click OK...

hh ntcmds.chm::/xcopy.htm

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
Stewart Berman said:
Windows XP Pro SP2

I have a scheduled job that runs a command file that is supposed to copy
all new and updated files from a partition on my hard drive to network
drive. The command I use is:

XCOPY "I:\*.*" "N:\INSTALL\" /D /E /V /C /I /Y >>
C:\Build\Backup\BackupBuild.log

The job is scheduled to run daily.

Unfortunately XCOPY is ignoring the /D and instead of only copying new
and updated files it is copying almost all of them.

The network drive is a Western Digital Net Center drive that directly
connects to my LinkSys router.

The dates shown (after backup) for a file that was copied are:

Source Drive:
Created: Sunday, December 10, 2006, 7:15:14 PM
Modified: Monday, June 27, 2005, 12:20:45 AM
Accessed: Today, May 12, 2007, 12:25:07 PM

NetCenter Drive:
Created: Monday, June 27, 2005, 12:20:46 AM
Modified: Monday, June 27, 2005, 12:20:46 AM
Accessed: Today, May 12, 2007, 12:28:44 PM

A file that was not copied has these dates:

Source Drive:
Created: Sunday, December 10, 2006, 7:15:14 PM
Modified: Monday, June 27, 2005, 12:20:45 AM
Accessed: Today, May 12, 2007, 12:25:07 PM

NetCenter Drive:
Created: Monday, June 27, 2005, 12:20:46 AM
Modified: Monday, June 27, 2005, 12:20:46 AM
Accessed:Today, May 12, 2007, 12:33:50 PM

I assume the Accessed date is due to viewing the properties.

It is obvious that the Created date is wrong on the NetCenter drive but
it can't be the source of the problem as the second file would have been
copied if that was the case.

It is also obvious that the Modified date is being copied. There appears
to be a difference in the way the date/time is stored as the NetCenter
drive has a one second later date. But that should keep the file from
being copied as it is later than the source drive date/time.

Is there a know problem in using XCOPY with network attached storage?
 

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