FileLen Function


FileLen Function

Class

Microsoft.VisualBasic.FileSystem

Syntax

     Dim result As Long = FileLen(pathName) 


pathName (required; String)

The name and path of the file to examine for its length

Description

The FileLen function retrieves the length of a disk file in bytes.

Usage at a Glance

  • pathName can be either an absolute path or a relative path from the current directory.

  • An error occurs if the file does not exist.

  • FileLen returns the length of a file as it was last recorded in the directory's record of files. Changes made to the file while actively open may not be reflected in this number. For files currently being modified by your application, use the LOF function instead.

Version Differences

In Visual Basic 2005, the My.Computer.FileSystem object provides more robust access to file management features.

See Also

LOF Function




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net