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.
Previous 12 Next Total 2 Pages
System poisoning or failure can be solved by the ribbon restore function, many times restore restore
In daily life and work, the network has become a very important part, but many user
During the operation of our computer, when we click on the broadband connection, there are always va
use of computers in daily life and work, it is inevitable that there will be operational errors or e
How to solve the problem of Win7 listening to the song suddenly bursting
Where is the win7 system add or remove program?
The little secrets of the win7 folder that you didn't know about
Win7 system excel form all blank no grid lines how to do?
Which is better for Windows 7 and Windows XP?
How to use the command line sxstrace.exe tool in Win7 system?
How to run debug software under win7 64-bit operating system
How to solve the win7 notebook connection projector does not respond
Lenovo notebook 510S i5 and i7 which is better?
Notebook Win7 system wireless Internet access often dropped or restricted how to do?
Win7 five most popular features big secret
How to check the running programs of the win7 computer in the background?
How to remove the junk option in the operating system right-click menu
Exploring the use of hidden features of win xp
How to use the cmd command to delete files that are not used by win7 system
Windows 8 skills big literacy 50 tips use highlights (3)
Reanalysis of network incomplete disconnection under Windows XP SP2 operating system
How to properly set up WinXP virtual memory
How to set the visual effect of the Win10 system
Win10 photo app photo source how to not display photos and videos in OneDrive