mongoosemanm Posted April 23, 2008 Report Share Posted April 23, 2008 At work, part of my job is to run some .bat files that do backups on various user computers, network drives, and servers. What I'm trying to do is figure out a way that I can do simpler error checking than my current method (manually check that the source and destination have the same number of files, sub folders, and space). I was thinking of doing this with MD5 sums, but that isn't really feasible seeing as this is a weekly backup of hundreds of thousands of files so the time to generate hashes would be far too long. Does anyone know of a good way to automate this error checking? Thanks. Quote Link to comment Share on other sites More sharing options...
mongoosemanm Posted April 23, 2008 Author Report Share Posted April 23, 2008 At work, part of my job is to run some .bat files that do backups on various user computers, network drives, and servers. What I'm trying to do is figure out a way that I can do simpler error checking than my current method (manually check that the source and destination have the same number of files, sub folders, and space). I was thinking of doing this with MD5 sums, but that isn't really feasible seeing as this is a weekly backup of hundreds of thousands of files so the time to generate hashes would be far too long. Does anyone know of a good way to automate this error checking? Thanks.I was doing some more research and came across the command comp to compare two files or sets of files. it seems to do exactly what I want it to, but I want to figure out some way to get the output to be very generic like a 1 indicates success and 0 indicates some sort of difference was found. that way if I export the output to a text file, someone can just search the text file for whatever that output is and if 0 shows up they know an error occurred. Any ideas on this matter? Quote Link to comment Share on other sites More sharing options...
Scarecrow Man Posted April 23, 2008 Report Share Posted April 23, 2008 There is not a whole lot you can do with a command prompt, but COMP and VERIFY may be what you are looking for.http://www.computerhope.com/comp.htmhttp://www.computerhope.com/verifyhl.htm Quote Link to comment Share on other sites More sharing options...
Mateo1041 Posted April 24, 2008 Report Share Posted April 24, 2008 Do you know Quick C or QuickBasic for DOS? Those would make some nice and easy command apps. Quote Link to comment Share on other sites More sharing options...
ɹəuəllıʍ ʇɐb Posted April 24, 2008 Report Share Posted April 24, 2008 I don't know how you backup these data, but if you use a professional backup software such as Acronis True Image, it will give you the ability to verify backup files. It will also give you easier automation than .bat files. Quote Link to comment Share on other sites More sharing options...
mongoosemanm Posted May 9, 2008 Author Report Share Posted May 9, 2008 thanks for the replies. sorry it took so long for me to get back. My boss wants to stick with the .bat files we use. I don't really have the option of using professional backup software. At least not at the moment. What I'm curious about now is how I would write up the script that will run comp on the source and backup after the backup is complete and then output to a text file. I'm a little rusty on batch files... Quote Link to comment Share on other sites More sharing options...
Mateo1041 Posted May 9, 2008 Report Share Posted May 9, 2008 thanks for the replies. sorry it took so long for me to get back. My boss wants to stick with the .bat files we use. I don't really have the option of using professional backup software. At least not at the moment. What I'm curious about now is how I would write up the script that will run comp on the source and backup after the backup is complete and then output to a text file. I'm a little rusty on batch files...You can output to text file by doing the following, for example:dir > text.txt Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.