Possible Duplicate:
programatically get the file size from a remote file using delphi, before download it.
Say I have a local file:
C:\file.txt
And one on the web:
How can I check whether the size are different, and if they’re different then //do something ?
Thanks.
To obtain the file size of a file on the Internet, do
For example, you can try
To obtain the size of a local file, the simplest way is to
FindFirstFileon it and read theTSearchRec. Slightly more elegant, though, isNow you can do
Notice: If in your case it is not enough to use 32 bits to represent the file sizes, you need to do some minor changes to the two functions above.