So, I had to copy a lot of files from my external HDD to my local HDD. Lot = 1.2 million files. The thing was in some folder hierarchy and obviously I wanted to preserve all that stuff. Problems
- Not safe to “move” because in case my experiments go awry, I still want the data to stay on the external HDD. So only looking at copy options.
- Default right click copy-paste was kind of slow. Or maybe it isn’t, but lets just assume it is.
- move and copy will on Windows will not work for directories
Solution – XCOPY
Create a folder INTO which you want the contents to come. cd into that folder. Then type
xcopy <path to directory whose contents will get copied. NOTE contents within this dir will be copied> /e /d
Notice the two switches e and d. e forces all directories that do not exist to be created – even if its empty on the external HDD. d is a trick
In case you decide to stop the process and carry on later, just Ctrl-C. Later, run the same command again – with /e and /d and copying will resume exactly where it left off. Dont worry about Ctrl-C cutting a large file and that file getting partially copied. It will be deleted on Ctrl-C and will resume from the beginning next time.
EDIT: If you have a LOT of files, it takes a LOT of time to resume coz it needs to check a LOT of files.