xcopy under Windows 2000 can copy security settings for a file

Source: Internet
Author: User
Tags date command line copy empty file system naming convention switches

NT4.0, if the file is copied elsewhere, the file's ACL joy is lost, must use the resource Kit inside the Scopy.exe program, and WIN2000 the following Xcopy program than nt4.0 more than a few parameters, you can copy the security settings of the file.

Xcopy replicates files and directories, including subdirectories.

xcopy source [destination] [/w] [/P] [/C] [/v] [/////////////////////////////////////L] [/n] [/exclude:filename] [/y |/-y] [/z]

Parameters

Source

Specifies the location and name of the file to be copied. The parameter must contain a drive or path.

Destination

Specifies the target of the file to be copied. This parameter can contain a drive letter and a colon, a directory name, a file name, or a combination.

/w

The following message is displayed and waits for your response before you begin copying files: Press any key to begin copying file (s)

/P

Prompts you to confirm whether you want to create each destination file.

/C

Ignore the error.

/V

Validate each file when writing to the destination file to ensure that the destination file is exactly the same as the source file. Because this feature is intrinsic to the Windows 2000 operating system, the switch is ignored. Accept this switch only for compatibility with previous versions of MS-DOS.

/q

Suppresses the display of XCOPY messages.

/F

Displays the source and destination file names when copying.

/L

Files are not copied, only the files to be copied are displayed (listed).

/d[:d ate]

Copies only those source files that have been changed after a specified date or a specified date. If the date value is lost, xcopy copies all new source files that are longer than the existing destination file time. This option allows you to update only files that have changed. If a date is specified, use a hyphen (-) as a delimiter instead of a forward slash (/) so that the date is not interpreted as another parameter.

/u

Copy (update) only files that are already in destination from source.

/I

If source is a directory or contains wildcard characters, and does not exist destination,xcopy will assume destination specify the directory name and create a new directory, and then copy all the specified files to the new directory. By default, Xcopy prompts you to specify whether destination is a file or a directory.

/s

Copies non-empty directories and subdirectories. If this switch is omitted, Xcopy will work in a directory.

/e

Copy all subdirectories, including empty directories. Used with the/s and/t switches.

/t

Copy only the subdirectory structure (tree) without copying the files. To copy an empty directory, you must include the/e switch.

/k

Copies the file and retains the property in the destination file if the source file has a read-only property. By default, read-only properties are deleted.

/R

Skipping read-only files while copying.

/h

Copy files that have hidden and system file attributes. The xcopy command does not replicate hidden or system files by default.

/A

Copy only the source files that have the archive file property settings. The switch does not modify the archive file properties of the source file. For information about how to set the archive file properties, see the attrib command.

/m

Copy the source file with the Archive file property settings. Unlike the/a switch, the/m switch closes the archive file attribute of the file specified in the source. For information about how to set the archive file properties, click Attrib in the Related Topics list [JG1].

/n

Use NTFS short file or directory name replication. This switch is required when you copy a file or path from an NTFS volume to a FAT volume or when the destination volume requires a FAT file system naming convention (8.3). The destination file system can be FAT or NTFS.

/exclude:filename

Excludes copying of files listed in the specified file. Excluded files can have a list of exclusion styles (one per line, wildcard characters are not supported). If an exclusion style in the file matches any part of the theme file path, the file will not be copied.

/y

Suppresses prompting you to confirm that you want to overwrite an existing destination file.

/y

Switches can be preset in copycmd environment variables. The switch can be replaced by/-y on the command line. The default is to prompt when overwriting, unless the copy command is executed from within a batch script.

To attach a file, specify a single destination file, multiple source files (using wildcard characters or file 1 + file 2 + file 3 format).

/-y

Prompts you to confirm whether you want to replace an existing destination file.

/z

You can restart the network replication in the mode. If the connection is lost during the replication phase (for example, if the server is disconnected offline), replication continues after the connection is established. Using this command switch also displays the percentage of replication operations completed for each file.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.