Windows has a quicker strategy to copy hundreds of tiny information and File Explorer isn’t it

I’ve seen a certain File Explorer behavior when I copy project files. The progress bar sprints to round 90%, after which it stalls and crawls till the job is accomplished. I haven’t got the identical expertise copying single large video information, and it has at all times felt backward.
I merely assume it is Windows simply being Windows. However, I examined Robocopy, a device constructed into Windows, towards Explorer, and it was quicker, although not precisely in the best way I anticipated.
300MB took longer than 5GB
Separate information performed a big function
On my pc, it took File Explorer about 30 seconds to repeat about 5,000 textual content information, roughly 300MB in complete. That works out to a mean of about 10MB/s. However, on that very same drive, I used to be in a position to copy a single 5GB file at round 260MB/s.
This is an expertise much like transferring 5,000 envelopes in contrast with one heavy field. What could make the previous slower is the paperwork per-item overhead. On a pc, the person information require their very own open, write, shut, and bookkeeping steps. When the information are this small, the work concerned in dealing with every particular person file can grow to be a big a part of the overall copy time. Explorer spent about three seconds “calculating” earlier than it began copying.
The setup I ran on Explorer included 5,000 generated textual content information on a WD SN530 NVMe SSD, operating Windows 11 25H2 (construct 26200.9457). I pointed Robocopy on the identical folder. Windows already consists of this device.
Robocopy solely beat File Explorer as soon as I switched on one setting
Windows ships with Robocopy, a command-line copier, so you aren’t putting in something to make use of it. You merely open a command immediate and run Robocopy. When I pressured Robocopy to make use of a single thread with /MT:1, there was barely a distinction. For the identical information, it took 29 seconds in comparison with Explorer’s 30 seconds.
However, multithreading modifications all the pieces. Here is the precise command I used:
robocopy "C:Source" "D:Destination" /E /MT:16 /NFL /NDL /NP /LOG:C:copy.log
/E tells it to repeat subfolders, whereas /MT:16 permits 16 information to be copied concurrently. Together, the final 4—/NFL, /NDL, /NP, and /LOG:C:copy.log—disable stay progress output, decreasing console rendering overhead. However, I needed to open the log if I wanted to see what occurred.
While testing, I used to be tripped up by two issues. The supply has to come back earlier than the vacation spot. When I intentionally swapped them, Robocopy handled the second path because the vacation spot and copied in the other way. It did not cease to ask whether or not I’d made a mistake. It additionally copies the contents of the supply folder into the vacation spot, relatively than making a Source folder inside it.
My command used 16 threads, and that very same copy took a few quarter much less time — down from 30 seconds to 22 seconds. Your day does not immediately change since you saved eight seconds; nevertheless, it made me curious. If 16 threads handed me eight seconds, I wanted to know what 128 threads would do.
128 threads carried out equally to 4 threads
Speed stopped enhancing previous 16, and one big file did not enhance in any respect
I did not fairly get the outcomes I hoped for. When I up to date my command to /MT:128, the operation lasted 25 seconds, much like what I bought after I used /MT:4.
|
Setting |
Time (Seconds) |
Time saved vs. Explorer |
|---|---|---|
|
Explorer |
30 |
baseline |
|
/MT:1 |
29 |
~3% |
|
/MT:4 |
25 |
~17% |
|
/MT:8 |
24 |
20% |
|
/MT:16 |
22 |
~27% |
|
/MT:32 |
22 |
~27% |
|
/MT:64 |
23 |
~23% |
|
/MT:128 |
25 |
~17% |
|
/MT:1 (rerun final) |
29 |
~3% |
The desk above summarizes my outcomes for ~5,000 generated textual content information (~300MB). The checks have been executed on the identical NVMe SSD, and the vacation spot was cleared earlier than every run. I recorded the median of three runs.
I noticed regular good points as much as 16 threads, after which it flattened. Since one second lands inside my run-to-run noise, I would not rank 16, 32, and 64 towards one another. I wanted to ensure that a heat file cache wasn’t inflating the latter outcomes, so I reran Explorer and /MT:1. Once once more, the outcomes have been 30 and 29 seconds.
I can not definitively confirm the reason for the plateau. My finest guess is that the drive, antivirus scanning, or one other per-file bottleneck was turning into the limiting issue.
There was no efficiency achieve on the one 5GB file. On Explorer, it took about 19 seconds. It took an equal period of time with /MT:1, /MT:16, and /J too, so none of these switches improved this specific switch. A single file does not give /MTa number of information to work on concurrently, so there was no related alternative for the additional threads to assist.
Used appropriately, and for the fitting sorts of information, I’ll follow Robocopy, however there may be one factor to remember.
One setting that slows it down and a command that may erase information
This total experiment was round a single NVMe drive and generated textual content information. I would not use it to foretell how images, onerous drives, USB sticks, or community shares behave.
I attempted a couple of different switches:
|
Switch |
What it does |
What occurred |
The catch |
|---|---|---|---|
|
|
Restartable mode, survives interruptions |
~25 s vs ~22 s |
~14% slower; value contemplating when a duplicate is likely to be interrupted |
|
|
One retry, one-second wait |
No locked or failed information |
Default is 1,000,000 tries at 30s (in principle, a really lengthy stall) |
|
|
Mirrors supply, deletes extras at vacation spot |
Disposable information solely |
Can erase information; use |
You ought to take note of /MIR. It deletes something further as a means of creating the vacation spot match the supply. If you swap paths, you could find yourself wiping the mistaken folder.
The default retry rely is 1,000,000 (/R) with a 30‑second wait (/W) between makes an attempt, which explains why a selected copy can seemingly cling endlessly.
I lean more towards using Robocopy for several small-file copies, however the helpful half was studying that extra threads ultimately stopped serving to, whereas a couple of switches may make a duplicate slower and even delete information if I wasn’t cautious.
