Is there a way to transfer thousand of small files faster on Windows 7?

30

6

I noticed that if I transfer a few large files between two hard drives, it's pretty speedy, at around at least 30 MB per second, but if I transfer thousands of files less than 5 KB, it is pretty damn too slow.. around 1 to 2 MB per second.

Is there a way to speed up the copy/paste process with thousands of small files on Windows 7?

netrox

Posted 2010-03-28T22:55:18.530

Reputation: 451

Answers

19

You might want to take a look at TeraCopy which is a program designed to copy and move files at the maximum possible speed by dynamically adjusting buffers to reduce seek times. TeraCopy can also do asynchronous copying which speeds up file transfer between two physical hard drives.

I have personally used this application and have found that it does speed up file transfers which usually would take some period of time to accomplish.

Hope this helps some.

Chris

Posted 2010-03-28T22:55:18.530

Reputation: 1 688

2TeraCopy crashed for me so I wouldn't recommend it as there's potential for data loss. – Simon Morgan – 2015-06-10T16:37:35.673

1@netrox: highly, highly recommended Teracopy. +1 – studiohack – 2010-03-29T04:40:07.010

3I had the opposite problem - copying 1m tiny files caused explorer to crash, but TeraCopy worked well! – RobinL – 2016-01-17T10:02:13.110

9

ZIP the files and then transfer the larger ZIP file? I don't know how long it would take to ZIP though (and if the total time is faster).

Kevin Yap

Posted 2010-03-28T22:55:18.530

Reputation: 981

8You still have to read all files on the source side and write all of them at the target side. It won't be faster. You'll just lose time for zipping them up. – Joey – 2010-03-28T23:02:26.483

2Actually, this works for me in my situation as I was really wanting to back up files... I don't care about unzipping. Zipping thousands of files sure worked... a zipped file was much faster than the usual copying. But yeah, I did try to unzip and it takes a while. Thanks for the suggestion. – netrox – 2010-03-29T03:10:21.080

1No problem; glad I helped. :) – Kevin Yap – 2010-03-29T03:38:51.590

2This works extremely well. I was able to get the transfer time of 200mb of files from 30 seconds using a plain copy down to 2 seconds (no compression, different drive). The reason it works is because there is a lot of overhead associated with creating and closing a new file. With an archive, it's has a single file handle (the archive) that you are appending data to. If you are moving to another hard drive, create the archive on the destination don't create it then move. – Despertar – 2016-12-13T04:09:11.143

Another usage case where this can help speed things up a lot is when transferring to/from portable flash drives or other slower media and interfaces. Zipping/Unzipping thousands of small files on an SSD with a SATA III connection is a lot faster than transferring thousands of files to/from a portable flash drive on USB. Cleanup is made a lot simpler too, as deleting a single zip file on the USB drive takes less than a second versus several minutes to delete a folder with thousands of small files in it. – positlux – 2018-01-30T00:24:54.647

7

The solution is to archive with WinRAR, but, when asked how to archive, choose store. This means that there will be no compression. Thus in approximately one minute you will end up with one large file to copy, which will copy very fast.

I tried to copy 19890 small files (5K or so each) and Windows told me that it would take 3 hours, TeraCopy said 3.2 hours, but with my method it only took 1.5 minutes.

Ion Apostol

Posted 2010-03-28T22:55:18.530

Reputation: 71

7Zip will let you set the compression type to "store" too. This is waaaayyyy faster than copying individual files. – Gabriel Luci – 2019-12-17T19:51:47.567

0

It's possible that part of what is slowing you down for many small files is if they are not in the same physical area of the disk. On a drive which is not very fragmented, a single large file will mostly all be read from one place, but if you have to read a bunch of separate files, they may be scattered across the disk.

ZIPing was the first idea that came to mind for me as well, but as pointed out above, you'd lose time to that process anyhow. I have noticed that in general, copying with RoboCopy.exe goes faster than doing it through the GUI. You might want to play around with that and see how it works for you.

nhinkle

Posted 2010-03-28T22:55:18.530

Reputation: 35 057

1You'll lose most time due to the frequent switching between file content and the MFT entries. Where the individual files are located on the disk is nigh irrelevant here. – Joey – 2010-03-28T23:20:07.953

0

It might be worth trying a quick defrag before ZIPing anything, but this is only really if you will be moving lots of small files, very often. If not then I suggest just zipping it (with 7zip or something - which will often compress better than just Windows standard compression) and then copy across.

And it also depends on the harddrives. Is this a USB external hard drive or 2 that are in the same system? If it's an old external hard drive it may be using USB1.0 or you may be better off having one with a power supply.

lavamunky

Posted 2010-03-28T22:55:18.530

Reputation: 314

0

ZIP has a 4 GB file limit (or something like that) - I usually use RAR archiver (it doesn't have that file size limit) and specify to not compress at all - this way archiving into a single file happens very fast, and then I simply copy that big file.

Andrey

Posted 2010-03-28T22:55:18.530

Reputation: 157

0

If its a unix based system you can use tar over ssh.
-The following command compresses all files and folders.

tar -cf - /home | ssh root@192.168.1.1 tar -xvf - -C /

-Transfer it and decompress it at the second computer.
This is much faster than copying only per scp

First read the man page and BE CAREFUL

user466567

Posted 2010-03-28T22:55:18.530

Reputation: 11

2The question contains the "windows" tag so your answer doesn't apply. – Nasreddine – 2015-07-07T11:08:50.550

2indeed. next time, read the tags, eh? – td512 – 2015-07-07T11:15:27.377

Not to mention, read the age of the question – qasdfdsaq – 2015-07-07T11:30:57.690