I recently had to copy a lot of files and in another case a huge file (8GB database dump). As i work on a windows machine i used a nice command line tool called robocopy. Every windows comes with robocopy and it has, even with the default parameters, a better performance than the copy function in the explorer. So how does it work?
- This how you list all possible parameters.
robocopy \?
- This copies the contents of the first folder into the second one. So far not surprising.
robocopy c:\test f:\test
- This will keep the first folder with second folder synchronized. So only files will be copied that were added or changed in the first folder since the command was run last.
robocopy c:\test f:\test /MIR
- If you just want to copy a single file you type something like this:
robocopy c:\test f:\test testfile.txt
- By default robocopy uses just one thread when copying. But if you have a lot of files to copy, you can use the parameter /mt:[number]. This allows robocopy to use more threads and copy multiple files at once.
robocopy c:\test f:\test /mt:4
- If you want to skip empty folders while copying use the /S Flag.
robocopy c:\test f:\test /S
Top comments (0)