Page 1 of 1

Generate CRC-32 Checksum with batch file

Posted: 12 Jun 2014 15:02
by Adrianvdh
Hey everyone, sorry I have been away for a while, been busy with school and all, but...

I recently looks at an old batch file I created for a YouTube video to register a OCX for the system (MSCOMCTL.OCX)
Well my code is efficient, but I would like to make it more.. Well I have a function (Already) to check if the file exists on the System32
directory and if it finds this file (That OCX ) I want it to check if it is the original file and not corrupted or anything.. So therefore I would
need to compare the found file's CRC-32 Checksum to the original file.

Does anyone have an idea of a function that can do this without using any 3rd EXE party app? Just native batch please :D.

Re: Generate CRC-32 Checksum with batch file

Posted: 12 Jun 2014 15:08
by einstein1969
Adrianvdh wrote:Hey everyone, sorry I have been away for a while, been busy with school and all, but...

I recently looks at an old batch file I created for a YouTube video to register a OCX for the system (MSCOMCTL.OCX)
Well my code is efficient, but I would like to make it more.. Well I have a function (Already) to check if the file exists on the System32
directory and if it finds this file (That OCX ) I want it to check if it is the original file and not corrupted or anything.. So therefore I would
need to compare the found file's CRC-32 Checksum to the original file.

Does anyone have an idea of a function that can do this without using any 3rd EXE party app? Just native batch please :D.


I have done crc32 check. But there is also md5 in this forum. try search.

einstein1969

Re: Generate CRC-32 Checksum with batch file

Posted: 12 Jun 2014 15:19
by Adrianvdh
Which would be better to use, the crc32 or md5 algorithm?

Re: Generate CRC-32 Checksum with batch file

Posted: 12 Jun 2014 15:23
by einstein1969
Adrianvdh wrote:Which would be better to use, the crc32 or md5 algorithm?


Md5 is better. But read the initial posts of this discussion for better info.

einstein1969

Re: Generate CRC-32 Checksum with batch file

Posted: 12 Jun 2014 15:35
by einstein1969

Re: Generate CRC-32 Checksum with batch file

Posted: 14 Jun 2014 04:20
by Adrianvdh
Well then shouldn't I rather go with CRC-32 instead MD5, because I am looking to just compare a file to a hash.

Re: Generate CRC-32 Checksum with batch file

Posted: 18 Jun 2014 15:14
by einstein1969
Adrianvdh wrote:Well then shouldn't I rather go with CRC-32 instead MD5, because I am looking to just compare a file to a hash.


I have finished my work. You can find code in this post

einstein1969