Page 2 of 2

Re: Generating/Verifying checksums

Posted: 13 May 2009 16:04
by zer0
TheQwerty wrote:The problem is that compare("$itemList", "1", "n"); is comparing the contents of $itemList to the value 1. It's not comparing the number of lines or number of items. You could set a variable at the beginning using $itemCount = GetInfo("CountSelected"); (and also set this to 1 if using the focused item), and then use this instead of $d.
Using this, I managed to fix things. However, there are a couple of concerns. Is there any way I can do away with $c being printed at the top of the list? How can I have just the file name and not the full path printed on the same line as the md5 string, since that's what $token gives me? Thank you very much for your help.

Re: Generating/Verifying checksums

Posted: 13 May 2009 16:15
by TheQwerty
zer0 wrote:Using this, I managed to fix things. However, there are a couple of concerns. Is there any way I can do away with $c being printed at the top of the list? How can I have just the file name and not the full path printed on the same line as the md5 string, since that's what $token gives me? Thank you very much for your help.
Did you try it with the script I attached? It should do exactly what you want.

I think the problem with your's might be that the first time through the while loop $c is undefined, so try initializing it before the loop.

Re: Generating/Verifying checksums

Posted: 14 May 2009 01:09
by zer0
TheQwerty wrote:I think the problem with your's might be that the first time through the while loop $c is undefined, so try initializing it before the loop.
Thank you for your help. It appears that checksums in XY are limited to md5 and verifying those isn't as straight-forward as desired. It's easier for me to stick to HashCheck, but I'll still be using XY because it gets called from the context menu :P

Re: Generating/Verifying checksums

Posted: 14 May 2009 19:28
by TheQwerty
zer0 wrote:Thank you for your help. It appears that checksums in XY are limited to md5 and verifying those isn't as straight-forward as desired. It's easier for me to stick to HashCheck, but I'll still be using XY because it gets called from the context menu :P
I'm curious, what exactly are you looking for in an XY implementation? What steps do you desire which would get you to replace HashCheck? Only in regards to MD5 for the moment, obviously it would be nice if Don added some functions for SHA1 and SHA256, but that's a bit beyond my scripting desires. :lol:

Re: Generating/Verifying checksums

Posted: 14 May 2009 20:01
by admin
TheQwerty wrote:
zer0 wrote:Thank you for your help. It appears that checksums in XY are limited to md5 and verifying those isn't as straight-forward as desired. It's easier for me to stick to HashCheck, but I'll still be using XY because it gets called from the context menu :P
I'm curious, what exactly are you looking for in an XY implementation? What steps do you desire which would get you to replace HashCheck? Only in regards to MD5 for the moment, obviously it would be nice if Don added some functions for SHA1 and SHA256, but that's a bit beyond my scripting desires. :lol:
SHA1 and SHA256... enlighten me: what's it good for?

Re: Generating/Verifying checksums

Posted: 14 May 2009 20:36
by zer0
TheQwerty wrote:I'm curious, what exactly are you looking for in an XY implementation? What steps do you desire which would get you to replace HashCheck? Only in regards to MD5 for the moment, obviously it would be nice if Don added some functions for SHA1 and SHA256, but that's a bit beyond my scripting desires. :lol:
Well, I quite like the way MD5 checksum creation is implemented in XYplorer. However, the checksum verification is less straight-forward. The advantage of HashCheck is that I can double-click on a checksum file and it will automatically check all the files in that folder against MD5 signatures. I'm sure with time checksum generating/verifying abilities of XYplorer will expand beyond a scripting command and I will patiently await that day :)

Re: Generating/Verifying checksums

Posted: 14 May 2009 20:41
by TheQwerty
admin wrote:SHA1 and SHA256... enlighten me: what's it good for?
I only really use them for verifying the integrity of files, but there's other uses http://en.wikipedia.org/wiki/SHA256#Applications
I also sometimes use them for comparing files here at work.
They're just other ways of calculating the hash of a file, using more bits to result in fewer collisions.

I'm not actually requesting these be added to XY; I'd much rather see a way in scripting to execute a console application and have the output captured, which would render the need for these a bit moot.

I was more interested in what was not straight-forward enough about the script I wrote for at least MD5s.

Re: Generating/Verifying checksums

Posted: 14 May 2009 20:43
by TheQwerty
zer0 wrote:
TheQwerty wrote:I'm curious, what exactly are you looking for in an XY implementation? What steps do you desire which would get you to replace HashCheck? Only in regards to MD5 for the moment, obviously it would be nice if Don added some functions for SHA1 and SHA256, but that's a bit beyond my scripting desires. :lol:
Well, I quite like the way MD5 checksum creation is implemented in XYplorer. However, the checksum verification is less straight-forward. The advantage of HashCheck is that I can double-click on a checksum file and it will automatically check all the files in that folder against MD5 signatures. I'm sure with time checksum generating/verifying abilities of XYplorer will expand beyond a scripting command and I will patiently await that day :)
So you're looking more to compare the files against MD5 files. This shouldn't be too difficult, is there a standard format for generated MD5 files? Or could you post the contents of a single file and mutli-file MD5 generated by HashCheck?

Re: Generating/Verifying checksums

Posted: 14 May 2009 20:59
by zer0
TheQwerty wrote:So you're looking more to compare the files against MD5 files. This shouldn't be too difficult, is there a standard format for generated MD5 files? Or could you post the contents of a single file and mutli-file MD5 generated by HashCheck?
Sure, here's a paste of the contents of a multi-file MD5 file:

Code: Select all

da7440aef7020b4baa757cf5f8c150a4 *xyplorer_7.90.0251_beta.zip
b1f0ad1b4de3b23e6a9b0ec6a192c053 *xyplorer_7.90.0253_beta.zip
4daf0942d905504fb1566e1a76bc4f1e *xyplorer_7.90.0254_beta.zip
fc4118d51483d5f0f3eafdf9dd5b2b67 *xyplorer_7.90.0255_beta.zip
ff1cdab22b0bfe1a0c9a6969b2172787 *xyplorer_7.90.0256_beta.zip
17fc778d15a1dea1855b8246796e90e6 *xyplorer_7.90.0257_beta.zip
77f950f9490e69e0830833ef55572e80 *xyplorer_7.90.0260_beta.zip
835bc2abd53d07610f337dd6602d7ef1 *xyplorer_7.90.0261_beta.zip
7329e43c04fd18294de72b6ed618fadb *xyplorer_7.90.0264_beta.zip
f8f9d009dbd067af732967b4177adb88 *xyplorer_7.90.0265_beta.zip
078f6124177546aff407da6d38af18ad *xyplorer_7.90.0300_beta.zip
61753189016e9269600593bff2407e22 *xyplorer_7.90.0250_beta.zip
So the format is

Code: Select all

MD5 *filename

Re: Generating/Verifying checksums

Posted: 17 Nov 2009 21:03
by tryforsure
I was curious to use this script, however it does it not seem to be working for me in the latest beta incarnation.

Could someone verify this for me please.

Thanks

Re: Generating/Verifying checksums

Posted: 17 Nov 2009 23:58
by TheQwerty
Sorry zer0, I got way too lazy to ever return to this. :P Maybe someday...
tryforsure wrote:I was curious to use this script, however it does it not seem to be working for me in the latest beta incarnation.
It was from the pre-command-to-function conversion.

Give the attached version a try.