Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking File Integrity...

Status
Not open for further replies.

NEE4NEE

Programmer
Nov 23, 2010
14
IN
Can i Check Integrity of file with Sys(2007)...?

it will be useful for me to verify that after download
the checksum is correct(not partial download).

lfString = filetostr("C:\myfile.zip")

lcNumber = sys(2007,lfstring,1,1) && Unique Checksum

 
Well, sys(2007) will certainly give you a checksum figure for the data you read off the disk in the file you mention.

You will need your remote system to either include the check sum in the file itself, or send you the checksum from their end to have something to compare it with though.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
You don't say what sort of file it is but Sys(2007) will only give you the checksum of a string so you'll need to use FileToStr() first.

If you're talking about a dbf file then you might do better to use Sys(2017) instead. This gives the checksum of an entire record. Either way as Griff says, you'll need to have calculated the checksum before download so that you've got something to test against.

Geoff Franklin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top