IT tutorials
 
Windows
 

Windows Server 2008 Server Core : Working with Data - Performing Bulk File Transfers with the XCopy Utility

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
12/12/2012 11:23:52 AM
The XCopy utility is one of the few that even Microsoft mentions regularly because it's so handy to have. You use the XCopy utility to perform bulk file transfers from anywhere on a local network to anywhere else on a local network. In addition to copying single files, XCopy can copy entire directory structures. It also has a wealth of command line switches so you have precise control over the copying process. This utility uses the following syntax:
XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V]
     [/W] [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U] [/K] [/N]
     [/O] [/X] [/Y] [/-Y] [/Z] [/B]
     [/EXCLUDE:Definition1[+Definition 2][+ Definition 3]...]

The following list describes each of the command line arguments.

Server Core administrators should consider moving to the RoboCopy command to perform some tasks.



source

Specifies which files to copy. You can use wildcard characters to define the file specification. See the "Working with Wildcard Characters" sidebar for details. The file specification can also include a drive and absolute or relative path.


destination

Specifies the destination for the files. When working with a single file, you can also specify a new filename for the file.


/A

Copies only the files with the archive attribute set. Copying the files doesn't change the attribute status, so you need to use the Attrib utility to change the archive bit. Some people use this particular feature to create a simple, but effective, backup utility. They send any changed files to a hard drive on another machine, and then clear the archive attribute. As an alternative, if you know the copying methodology works without flaw, you can use the /M command line switch.


/M

Copies only the files with the archive attribute set. However, unlike the /A command line switch, this command line switch does reset the archive bit.


/D[:
Month-Day-Year]

Copies files changed on or after the specified date. When you leave out the date, then XCopy only copies the file when the date of an existing file in the destination is older than the source file. If the dates are the same or newer, then XCopy doesn't copy the file.


/EXCLUDE:
Definition1[+Definition2][+ Definition3]...

Excludes files or directories based on the strings you provide. For example, specifying .TXT as a string excludes all text files from the copy. On the other hand, specifying a string such as \MyDir excludes the entire \MyDir subdirectory from the copy. You can make strings ambiguous to describe a number of conditions. For example, including the string My would exclude files or directories with the word My in them as any part of the name, including the extension. You can create multiple excludes by separating each exclude string with a plus sign (+).


/P

Prompts the user before creating each destination file.


/S

Copies all files in the current directory, plus all subdirectories and their files except empty subdirectories. You can't use this command line switch to create an empty directory structure for a user or application; use the /E command line switch instead.


/E

Copies all files in the current directory, plus all subdirectories and their files including empty subdirectories.


/V

Verifies each new file as the system writes it. This command line switch overrides the system verify setting.


/W

Waits for the user to insert a floppy disk or other removable media before beginning the copy process. Generally, you'd use this option as part of a batch file where the copying process requires more than one disk.


/C

Forces XCopy to continue copying files even when an error occurs. Normally, XCopy stops when it encounters the first copy error.


/I

Forces XCopy to assume the destination is a directory when the destination doesn't exist and you're copying more than one file. Otherwise, XCopy displays a message asking the user whether the destination is a file or a directory. This will cause a batch file to halt to wait for user participation.


/Q

Copies the files without displaying the filenames. You can use this option in a batch file where you don't necessarily want the user bothered or aware of everything that's happening in the background.


/F

Displays full source and destination filenames while copying, including both the drive and the path. Normally, XCopy displays only the filenames. This feature often comes in handy when diagnosing problems with complex batch files because it shows precisely where XCopy copies each file.


/L

Displays a list of files that XCopy would copy, without actually copying them. This is a diagnostic mode where you can log the files and verify that the command line syntax produces the desired result.


/G

Copies encrypted files to a destination that doesn't support encryption. This is a Windows-specific command line switch. The resulting destination files are unencrypted when you complete the copy, so using this command line switch can result in a security hole in your system.


/H

Copies any files marked hidden or system. Normally, XCopy only copies the files without these attributes since hidden and system files are normally associated with operating system requirements (they aren't data files).


/R

Forces XCopy to overwrite read-only files. Normally, XCopy won't overwrite read-only files to preserve their content.


/T

Creates the directory structure, but doesn't copy any of the files. You can use this feature to create an empty directory structure for a new user or application without compromising data that might appear in an existing pattern directory structure. This command line switch won't include empty directories and subdirectories in the source. To include the complete directory structure in the destination, combine the /T and /E command line switches.


/U

Copies only the source files that already exist in the destination. You could use this feature to perform updates on another system without compromising any unique files in the source system.


/K

Copies all of the file and directory attributes. XCopy normally resets some of the attributes, such as read-only.


/N

Creates a destination file with an 8-character filename and a 3-character file extension. Use this command line switch when you must create destination files for older systems that rely on the DOS 8.3 naming convention. Avoid using this command line switch on files with long filenames unless you really do want to create a compatible file.


/O

Copies the file ownership and Access Control List (ACL) information. The ACL provides security for the file. If you don't use this command line switch, the destination system uses the default security settings for that system, which might not provide sufficient security for sensitive data.


/X

Copies the file audit settings in addition to the file ownership and ACL information. File auditing monitors each file as Windows opens, closes, or modifies it. Using file auditing helps you track user and system activities, but does cause a performance hit.


/Y and /-Y

Suppresses or enforces the prompt for overwriting destination files with the same name as the destination file provided as input to the XCopy command. Use the /Y command line switch in batch files where you know the batch file will overwrite an existing destination file. The /-Y command line switch is the default, so you never need to use it.


/Z

Copies networked files in restartable mode. If the copy process stops for any reason, XCopy attempts to restart the file copy.


/B

Copies a symbolic link to the target instead of the actual file pointed to by the symbolic link when the source is a symbolic link.

 
Others
 
- Windows Server 2008 Server Core : Working with Data - Validating File Operations with the Verify Command, Performing Backups with the WBAdmin Utility
- Windows Small Business Server 2011 : Partitions and Volumes (part 4) - RAID-5 Volumes, Mounting a Virtual Hard Disk, Mounting a Volume
- Windows Small Business Server 2011 : Partitions and Volumes (part 3) - Adding a Mirror, Drive Failure in a Mirrored Volume
- Windows Small Business Server 2011 : Partitions and Volumes (part 2) - Extending or Shrinking a Volume
- Windows Small Business Server 2011 : Partitions and Volumes (part 1) - Adding a Partition or Volume
- Windows Small Business Server 2011 : Disk Management - Managing Disks
- Supporting Computers Running Windows 8 (part 2) - Getting Advanced System Information, Working with WMI Control
- Supporting Computers Running Windows 8 (part 1) - Working with the Computer Management Console, Getting Basic System and Performance Information
- Windows 7 Networking : Libraries and Public Folders, Network and Sharing Options
- Windows 7 Networking : Connecting a Printer or Other Device, Your HomeGroup
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us