Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generating a Checksum32 on a File
Message
From
29/11/1999 07:40:34
 
 
To
28/11/1999 23:54:23
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00296267
Message ID:
00296321
Views:
17
>PKZip has a nice feature that generates a 32-bit checksum of each file in the archive, in order to ensure data integrity.
>
>Can anyone outline how to generate one in VFP for an arbitrary file, or point me to a reference?

You could use SYS(2007) after using FILETOSTR() to grab the file content; it is not the same checksum algorithm, yielding a 16 bit value, but it's free and quick:

nCheckSum = SYS(2007,FILETOSTR(cFileToCheckSum))
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform