Hi,

I am having trouble detecting an empty file opened in Binary mode. I have tried the following function and it always returns false.

Code:
Public Function fnEmptyFile (ByVal strPath as String)
     Dim FileHandle%

     FileHandle% = FreeFile
     Open strPath For Binary Access Read Write As #FileHandle%

     If (EOF(FileHandle%) = True) then
          fnEmptyFile = True
     else
          fnEmptyFile = False
     End If

     Close #FileHandle%

End Function
Does anyone have any suggestions as to how to detect an empty file?

Thanks

MechEngCoder