1
I have over 1 million (small size) files(<500kB jpg) in a structure like this:
H:\main_folder\folder\sub_folder\sub_sub_folder\sub_sub_sub_folder
Every sub_sub_sub_folder have 10-15 files, sub_sub_folder could be a date/time stamp, sub_folder is a machine_name and folder is another incremented number.
I need to have a copy of main_folder with the same structure but I need to verify that my copy is 100% the same as the source. Windows Explorer will block after ~1000 copies, doesn't even show the properties (size, size on disk, contains).
I need a batch that will go to H:\main_folder\folder\sub_folder\sub_sub_folder\sub_sub_sub_folderA
read© all the 14 files attributes and paste them in Z:\main_folder\folder\sub_folder\sub_sub_folder\sub_sub_sub_folderA
, open a file log.txt, write:
"file1.jpg 490kB copied from H:\main_folder\folder\sub_folder\sub_sub_folder\sub_sub_sub_folderA to Z:\main_folder\folder\sub_folder\sub_sub_folder\sub_sub_sub_folderA successfully ..."
and
"file15.jpg 470kB copied from H:\main_folder\folder\sub_folder\sub_sub_folder\sub_sub_sub_folderA to Z:\main_folder\folder\sub_folder\sub_sub_folder\sub_sub_sub_folderA successfully"
e.t.c.
mark the end of the log(one line of ====== or something) and only then proceed to the next operation(copy content and folder structure of sub_sub_sub_folderB). If copy operation not successfully terminated stop, create a new log error_sub_sub_sub_folderB.txt (the next log will be error_sub_sub_sub_folderZ.txt) and only after the log is created move to the next sub_sub_sub_folder
In a few words: a step by step logging copy batch that doesn't kill the system or the machine hardware resources.
try whatever to do the copy, and then use "Beyond Compare" to compare the source and dest. I don't see how making a log of the copy will help you, as you're not going to want to read through it all. So I suggest a program to check the src and dst are the same in content and structure. – barlop – 2015-01-22T06:14:20.900
you can also do dir /a-d/s and you will get all files listed with their sizes. Do that at the dest, and you will see if all the files are at the dest, and the size isn't funny e.g. size isn't 0 bytes or all sizes are within what you expect. What i'm suggesting doesn't involve a batch file though. Just a copy command and one or two commands after to check that it copied. And you could use "beyond compare" too or any folder sync program to check. – barlop – 2015-01-22T06:20:52.947
Maybe robocopy would be a good tool – Ivan Viktorovic – 2015-01-22T11:43:59.103