In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces the batch processing of Copy and Xcopy command what are the differences, have a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor with you to understand.
The difference between Copy and Xcopy
First, copy cannot rename a file name while copying a file with a subdirectory.
Note, here C: is the root directory, bat is the subdirectory), and xcopy can, but there will be a prompt, of course, you can add parameters without prompting it.
The code is as follows:
C:\ > copy c:\ bat\ hai.bat d:\ bat\ hello.bat
Tip: the system cannot find the specified path.
0 files have been copied.
You can do this:
The code is as follows:
C:\ > copy c:\ hai.bat d:\ hell.bat
1 file has been copied
C:\ > xcopy c:\ bat\ hai.bat d:\ bat\ hello.bat
Destination D:\ bat\ hello.bat is the file name
Or the name of the directory?
(F = file, D = directory)? F
C:\ bat\ hai.bat
1 file was copied
Second, the copy command can merge two files, but xcopy cannot
Merge the files 1.txt and 2.txt into 3.txt
The code is as follows:
Copy / b c:\ 1.txt+2.txt c:\ 3.txt
Command format: copy / b file 1 + file 2. File N merged file name
Command description: use "+" to merge multiple files in the same or different formats into a single file.
Tips:
1, a picture file with text data hidden at the end, which may be lost after using other file editors and saving it.
After connecting the MP3 files using this method, continuous playback can be achieved.
3. Binary files such as compositing pictures / songs must use the / b parameter (b stands for Binaty, binary), otherwise it will fail
Another merge parameter is / a (ASCII, text file), which can only be used for plain text merging.
The two parameters cannot be used at the same time, binary can merge text files and binary files, while text can be used for plain text merging.
C:\ > copy c:\ bat\ hai d:\ hello
Command explanation: copy all files in the bat directory of disk C to the hello directory of disk D. If you want to select a specified type of file (such as txt file) under D:\ hello, you can use:
The code is as follows:
C:\ > copy c:\ bat\ hai\ * .txt d:\ hello
Description: files and folders in subdirectories will not be copied. D disk hello directory must exist
The code is as follows:
C:\ > xcopy c:\ bat\ hai d:\ hello / e _ gamh
The command explains:
Copy the C disk bat folder into the D disk hello folder, including all subdirectories and files with hidden and system file attributes. Regardless of whether the hello folder already exists, you will be prompted to create it if it does not exist.
Description:
/ e means to copy all subdirectories, including empty directories. / h copy files with hidden and system file attributes.
Thank you for reading this article carefully. I hope the article "what are the differences between Copy and Xcopy commands in batch processing" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.