Solution:
It is recommended that if you want to copy a directory containing multiple large files, you need to use the RoboCopy command, which is a command line directory copy command that has been a Windows resource since Windows NT 4.0. Part of the toolkit, then built into Windows Vista, Windows 7, and Windows Server 2008 as standard features, this tool not only copies very fast, but also supports breakpoint retransmissions, and even supports copying at a defined time. This feature has also been upgraded in Windows 7? D?D can already support multi-threading, which means that the replication speed can be greatly improved. And this feature creates a full mirrored copy of two file structures without copying any unwanted duplicate files, while also allowing you to keep all relevant file information, including date and time stamps, security access control lists (ACLs), and more. The copying of N small file directories can increase the speed by an order of magnitude. Thousands of files are copied in 3 seconds, and the usual copy and paste method takes about 45 seconds. For example, if you want to copy all the files in the CD-ROM to the //CD directory of the E-disk, you can run the following command: Robocopy /s F://E://CD Even if you suddenly remove the CD at this time, it does not matter, Robocopy will wait until the disc is reinserted into the drive and the copy will start automatically. Robocopy also supports LAN copying, and even the directory structure of the specified directory in the LAN server can be moved to the local. Robocopy supports the timing operation, and the copy operation can be performed at night to avoid congestion on the LAN and inconvenience to others. Let's take a look at the usage of this command, as shown below:
For example: RoBoCopy dir_from dir_to /E /MT:50 /LOG:copy.log where /E means subdirectory is included, /MT:50 is 50 Threads (default 8 threads, up to 128), /LOG is the redirect output. More options can be viewed with robocopy /?. Command syntax: ROBOCOPY source destination [file [file]...] [options] Source: Source directory (drive: path /////server //share //path) Target: target directory (drive ://Path or ////server //share //path) File: File to be copied (name /wildcard: default is " *. * ") In order to test the speed of copying files, the following test
It can be seen from the above figure that in the case of 120 threads, a single file with a size of 878.16MB is copied, starting at 14:56:31 and ending at 14:57:06, sharing 35 seconds to get time. It is recommended that in order to be able to test how many threads can be selected to copy files more quickly, use PowerShell scripts for batch processing to test the corresponding relationship between time and thread in the case of different threads, and plot them on coordinates. The tested PowerShell script is as follows: for($i=128;$i ?Clt 129;$i++){ Robocopy /s C://CD C://test//CD$i /MT:$i /LOG:log /copy$i.log remove-item C:////test//CD$i//*.* "$i ," >>log/answ.txt (Get-Content C://Log//copy$i.log -TotalCount 6)[-1] >>log/answ.txt "," >>log/answ.txt (Get-Content C://log//Copy$i.log -TotalCount 10000)[-1] >>log/answ.txt} The format of the script output is formatted, imported into Excel via CSV format, and the line chart is as shown in the following figure. & nbsp; Series 1 & rdquo; Line:
There are 324 files in the target directory of the copy, the single file size is between 1MB and 2MB, the total file size is 549MB, compared with the single file with the size of 878.16MB above. When copying It is longer than before. Because of the large number of files, it takes a long time to copy one by one, and there will be errors after many experiments. After normalization, the yellow color in the figure is linear (Series 1). ), as shown by the line, you can see that the same file group has different copy speeds when using different threads. As the number of threads increases, the copy time decreases linearly. In fact, robocopy has many powerful methods of use. Readers can use the robocopy /? command to query, or view the detailed options of the RoboCopy command from the attachment at the end of this article, from which the reader will find more powerful options for this command.
The computer always records some of the documents we usually open on the computer. In general, the d
In Win7 system can not open the camera directly in the My Computer like the XP system, although the
Reason analysis: This may be because the use of third-party optimization software has accidentally d
Recently, we found out that Windows 7 is really suitable for partitioning. Many friends choose to fo
Windows 7 and SSD (Solid State Drive)
Win7 32-bit flagship version of the ateclxx.exe process causes the computer blue screen how to solve
What should I do if the Win7 system screen font is blurred?
Winxp hard disk installation win7 system graphic tutorial
Modify the registry to let Win7 have a quick start function
How many ways does Windows 7 install drivers?
How does the win7 system desktop icon become smaller?
How to group names for Win8 system Metro desktop applications
Why reinstall Windows? What is the method?
Win7 system prompts "login process initialization failed" how to do
Enterprises or will look at the power management in Windows 7
How to use memory diagnosis in win7 system
Microsoft repairs Win7 SP1 can not sleep properly
How to make Win10 display IME icon
How to use CMD command to copy and delete folders under windows7?
How to create standard users under Win7 system
Which is better for Linux compression tools gzip and pigz?
Italian User Benefits You can choose not to pay Windows usage fees to Microsoft
Play win8 system How to install win8
Win10 application installation location modification method
How to solve the U disk formatting failure under Win8 system?