Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 169
  • Last Modified:

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.



0
samic400
Asked:
samic400
  • 2
1 Solution
 
BahnassCommented:
U mean


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



' FileLen  is the file length
0
 
BahnassCommented:
this method does not need FSO or any extra ocx
only an access permission to file
0
 
samic400Author Commented:
that did it.

thank you.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now