find out file size

I'm building an application where, through a sockets program, I'm sending out a file to a remote site occasionally.

What I'd like to do is figure out how big my file is before I send it out and as I send out chucks of data, let the users know how much is left to send.

Could someone offer some ideas with a small snippet of code.

Thanks in advnace.

LVL 13
Who is Participating?
BahnassConnect With a Mentor Commented:
this method does not need FSO or any extra ocx
only an access permission to file
U mean

  Open FileName for binary as FileNo
  FileLen = LOF(FileNo)
  close FileNo

' FileLen  is the file length
samic400Author Commented:
that did it.

thank you.
All Courses

From novice to tech pro — start learning today.