-
Is there any *simple* way of getting a file's size, even if it is already open? I'm using this
Code:
Open f$ For Binary As #2
Size(J) = LOF(2)
Close #2
But, I get "Error 55: File already open" when it comes across files that are in use. I've looked at the GetFileSize and GetFileSizeEx API calls, and examples of how to use them, and I really don't wanna go through that much work just to get the file's size. I've also looked at GetFileAttributes, but that doesn't look any simpler. Any ideas?
-
Ths can be done without any API function call.
Code:
Open "C:\pats.mdb" For Binary As #1
MsgBox "(From Open File) File size is : " & LOF(1) & " bytes"
Close #1
MsgBox "(using FileLen function and file is closed) File size is : " & FileLen("C:\pats.mdb") & "bytes"
-