Returns the length of a file in bytes (Long).
|pathname||The full pathname of the file you want to examine (String).|
|* The "pathname" will often include a directory and a drive.|
* If "pathname" is not a valid file path, then you will get a run time error.
* If the file is question is currently open, the value returned is the size of the file immediately before the file was opened.
* You can use the FILEDATETIME function to return the date and time when a file was created or last modified.
* You can use the GETATTR function to return the attributes of a file or directory.
* You can use the LOF function to obtain the length of an open file.
* The equivalent .NET function is Microsoft.VisualBasic.FileSystem.FileLen
* For the Microsoft documentation refer to learn.microsoft.com
Dim lFileSize As Long
lFileSize = FileLen("C:\text.txt")
lFileSize = FileLen("C:\temp\myfile.txt")
© 2023 Better Solutions Limited. All Rights Reserved. © 2023 Better Solutions Limited Top