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
samic400Asked:
Who is Participating?
 
BahnassConnect With a Mentor Commented:
this method does not need FSO or any extra ocx
only an access permission to file
0
 
BahnassCommented:
U mean


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



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

thank you.
0
All Courses

From novice to tech pro — start learning today.