xcopy

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

i will to xcopy file by Windows schedule

but i only wish to copy those files which the destinction folder has no
these files.

Can i do it by xcopy command without prompting me for yes or no? if yes,
what is the switch?

Thanks a lot.
 
you can use the /y switch to suppress it from prompting
you when overwriting files.
 
Tony said:
i will to xcopy file by Windows schedule

but i only wish to copy those files which the destinction folder has no
these files.

Hi

xcopy.exe doesn't support what you want as far as I know.

Look into Robocopy.exe instead, I think using the command line
switches "/XC /XN /XO" will have the result you want, copying
only the files that exist in the source only and not in the
destination folder (note that same files are not copied by
default with robocopy, so you don't need to use an exclude
switch on those).

/XC Excludes files tagged as "Changed".
/XN Excludes files tagged as "Newer".
/XO Excludes files tagged as "Older".


Robocopy.exe is in the free Windows Server 2003 Resource Kit:

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

(The kit will install on WinXP or later)


See rktools.chm and robocopy.doc for documentation for Robocopy.exe.
 
-----Original Message-----
Copies files and directory trees.

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/W]
[/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U]
[/K] [/N]

source Specifies the file(s) to copy.
destination Specifies the location and/or name of new files.
/A Copies files with the archive attribute set,
doesn't change the attribute.
/M Copies files with the archive attribute set,
turns off the archive attribute.
/D:date Copies files changed on or after the specified date.
If no date is given, copies only those files whose
source time is newer than the destination time.
/P Prompts you before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty ones.
Same as /S /E. May be used to modify /T.
/W Prompts you to press a key before copying.
/C Continues copying even if errors occur.
/I If destination does not exist and copying more than one file,
assumes that destination must be a directory.
/Q Does not display file names while copying.
/F Displays full source and destination file names while copying.
/L Displays files that would be copied.
/H Copies hidden and system files also.
/R Overwrites read-only files.
/T Creates directory structure, but does not copy files. Does not
include empty directories or subdirectories. /T /E includes
empty directories and subdirectories.
/U Updates the files that already exist in destination.
/K Copies attributes. Normal Xcopy will reset read-only
attributes.
/Y Overwrites existing files without prompting.
/-Y Prompts you before overwriting existing files.
/N Copy using the generated short names.
 

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