Problem:
We all know that in Linux, we can use the command CP-RF file renamefile to back up folders. How can we use it in windows?
Solution: Use the xcopy command
Write the following command into a file and save it as a file ended with. bat, for example, xcopy. bat.
Xcopy/I/y/E: \ ftpserver \ CPS-% Date :~ 0, 10%
Double-click xcopy. BAT and you will find that E: \ ftpserver has a file cps-2012-05-16 with a date command
Note:
Do not save this name as xcopy. bat, otherwise it will not stop refreshing, because the xcopy command will be used in the command, do not avoid it !!!
Case:
Xcopy/I/y/E c: \ bank \ data c: \ bank \ databack \ data-% Date :~ 0, 10%
Start c: \ bank \ ctbase.exe
Resolution:
Xcopy is an extension of copy. You can specify the DirectoryConnection file and directory structureCopy together, but do not copy the hidden and system files. specify at least one source drive letter, source target path name, and source file name when used; when/s is selected, all files in the source directory and Its subdirectories are copied. Unless the/e parameter is specified, the/s will not copy the empty directory. If the/S parameter is not specified, xcopy will only copy the files in the source directory, but will not involve the subdirectories under it; when the/V parameter is selected, the copied slice is verified, but the speed is reduced.
/I if the target does not exist and more than one file is being copied, it is assumed that the target must be a directory.
/Y cancel the prompt to confirm that you want to overwrite the existing target file.
/E: Copy directories and subdirectories, including empty ones.
For details about the xcopy command, refer to the following documents ~
Http://baike.baidu.com/view/893375.htm