FileLen Function |
Microsoft.VisualBasic.FileSystem
FileLen( pathname )
The filename, along with its path and drive name ( optionally )
A Long containing the length of the specified file in bytes
Specifies the length of a file on disk
If you don't specify a drive or folder with pathname , the file is assumed to be in the current drive or folder.
Use the File.Exists method in the System.IO namespace to determine that the file exists before calling FileLen . If the file does not exist, FileLen generates runtime error 53, "File not found."
Because FileLen returns the length of a file based on the file allocation table, the value returned by FileLen will reflect the size of the file before it was opened. In the case of open files, you should instead use the LOF function to determine the open file's current length.
LOF Function