Page 1 of 1

downloaded file content <> content url()

Posted: Wed Oct 17, 2012 9:14 pm
by jmburnod
Hi All,
I downloaded a simple .txt file from an http url. I need to compare the content of downloaded file with the content of the file on the http.

Code: Select all

on mouseUp
   put "http://www.alternatic.ch/jmb/ecrireenpictos/ArchInstallEEP" & "/" & "listeFolderEEP2.txt" into tlisteFolderEEP2
   put url (tlisteFolderEEP2) into tListeInstall1
   put specialfolderpath("documents") & "/" & "listeFolderEEP2.txt" into tPathInstall
   libURLDownloadToFile tlisteFolderEEP2,tPathInstall
   wait 30
   put url("file:" & tPathInstall) into tListeInstall2
   put (tListeInstall1 = tListeInstall2) & cr & tListeInstall1 & cr & cr & tListeInstall2 -- return false, some cr disappear
end mouseUp

I expected get the same data in the file where i downloaded the file by libURLDownloadToFile and the data i obtained by "put url", but there is not the case.

What is the trick to avoid this ?

Thanks

Jean-Marc

Re: downloaded file content <> content url()

Posted: Wed Oct 17, 2012 9:31 pm
by Mark
Hi Jean-Marc,

I don't understand why you want this, but probably

Code: Select all

 put url("file:" & tPathInstall) into tListeInstall2
should be

Code: Select all

 put url("binfile:" & tPathInstall) into tListeInstall2
Kind regards,

Mark

Re: downloaded file content <> content url()

Posted: Wed Oct 17, 2012 9:49 pm
by jmburnod
Hi Mark
Yes. It is what i want
I don't understand why you want this
To compare the content of the file on the disk and the file on the server.

Thanks again
Jean-Marc

Re: downloaded file content <> content url()

Posted: Wed Oct 17, 2012 10:21 pm
by Mark
Jean-Marc,

Why would you want to compare two files that you have downloaded from the same location?

Mark

Re: downloaded file content <> content url()

Posted: Thu Oct 18, 2012 12:56 pm
by jmburnod
Mark,
Why would you want to compare two files that you have downloaded from the same location?
Because the file on the server can be changed and i want know if it changed or not.
Jean-Marc