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 .
Generate CRC-32 Checksum with batch file
Moderator: DosItHelp
-
- Expert
- Posts: 960
- Joined: 15 Jun 2012 13:16
- Location: Italy, Rome
Re: Generate CRC-32 Checksum with batch file
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 .
I have done crc32 check. But there is also md5 in this forum. try search.
einstein1969
Re: Generate CRC-32 Checksum with batch file
Which would be better to use, the crc32 or md5 algorithm?
-
- Expert
- Posts: 960
- Joined: 15 Jun 2012 13:16
- Location: Italy, Rome
Re: Generate CRC-32 Checksum with batch file
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
-
- Expert
- Posts: 960
- Joined: 15 Jun 2012 13:16
- Location: Italy, Rome
Re: Generate CRC-32 Checksum with batch file
Well then shouldn't I rather go with CRC-32 instead MD5, because I am looking to just compare a file to a hash.
-
- Expert
- Posts: 960
- Joined: 15 Jun 2012 13:16
- Location: Italy, Rome
Re: Generate CRC-32 Checksum with batch file
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