Keep getting bogus MD5 value?

Hi there

I want to get the MD5 value for a file I just copied to a network location using “cp”. The strangest thing keeps happening. Sometimes there is network traffic and sometimes not. It would appear that the md5 is being generated from somewhere else. One theory is that it is being generated from the disk cache and not the location I am specifying. I’ve tripple checked the paths I’m sending to my handler posted below, so the path “IS” correct, yet no network activity.

When I copy larger files it appears to work correctly for some and then suddenly - nothing !!!

If this is caused by the cache, is there a way to clean it out before I do the md5 checksum?

on Get_MD5_CHECKSUM_VALUE(theFile)
	set theFile to quoted form of (POSIX path of theFile)
	my Info_Display("MD5 :" & return & theFile)
	delay 0.1
	try
		set FilePath_MD5_CHECKSUM_VALUE to do shell script "md5 " & theFile & ""
		set FilePath_MD5_CHECKSUM_VALUE to my ExtractMD5_From_TEXT(FilePath_MD5_CHECKSUM_VALUE)
	on error
		set FilePath_MD5_CHECKSUM_VALUE to "FAILED"
	end try
	return FilePath_MD5_CHECKSUM_VALUE as string
end Get_MD5_CHECKSUM_VALUE

kind regards

EM

Model: G5 Dual 2.7 3.5 GB Ram
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

If that’s what I think it is, it’s unnecessary. Just use the -q option with md5:

set FilePath_MD5_CHECKSUM_VALUE to do shell script "/sbin/md5 -q " & theFile

Hi Bruce

Thanks for the tip. I’ll certainly implement it. Any ideas on the problem i’m having. I checked the path I supply through the “theFile” variable again and again. It is correct. What’s going on ?

regards

EM