File Size

  • Thread starter Thread starter aussie rules
  • Start date Start date
A

aussie rules

Using a fileopen dialog, my user can select a file. I save this file name
into a string value.

How can I get the file size, so that I can make sure that the maximum file
size they select is 10mb

Thanks
 
* "aussie rules said:
Using a fileopen dialog, my user can select a file. I save this file name
into a string value.

How can I get the file size, so that I can make sure that the maximum file
size they select is 10mb

'FileLen' will return the file's size in bytes. Alternatively, you can
use 'System.IO.FileInfo.Length'.
 
dim f as new System.IO.FileInfo(filename)
debug.writeline f.Length.ToString()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top