Friday, March 30, 2007

Xcopy - Copy files and folders

Xcopy - Copy files and folders
XCOPY
Copy files and/or directory trees to another folder. XCOPY is similar to the COPY command except that it has additional switches to specify both the source and destination in detail.XCOPY is particularly useful when copying files from CDROM to a hard drive, as it will automatically remove the read-only attribute.Syntax
XCOPY source [destination] [options]
Key
source : Pathname for the file(s) to be copied.
destination : Pathname for the new file(s). [options] can be any combination of the following: Source Options
/A Copy files with the archive attribute set (default=Y)
/M Copy files with the archive attribute set and turn off the archive attribute, use this option when making regular Backups (default=Y) /H Copy hidden and system files and folders (default=N)
/D:mm-dd-yyyy Copy files that have changed since mm-dd-yyyy.
If no date is given, the default is to copy files with a modification date before today.
(at least 1 day before)
/U Copy only files that already exist in destination.
/S Copy folders and subfolders
/E Copy folders and subfolders, including Empty folders. May be used to modify /T.
/EXCLUDE:file1[+file2][+file3]...
(Windows 2000 only) The files can each contain one
or more full or partial pathnames to be excluded.
When any of these match any part of the absolute path
of a SOURCE file, then that file will be excluded.
For example, specifying a string like \obj\ or .obj will exclude
all files underneath the directory obj or all files with the
.obj extension respectively. Copy Options

No comments: