Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check file size

Status
Not open for further replies.

waynebrady

Programmer
Feb 20, 2003
24
US
Is there a quick function/way to identify the file size of a file on disk? I wanted to avoid listing the directory to a text file and then parsing and locating the file size from that.

Wayne Brady
 
Code:
lcDir = ADIR(laDir,FullPath([YourFile.DBF]))
? laDir[1,2]

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
MVP VFP
 
If you like Low Level Functions

lnFileHandle = FOPEN("filename.ext")
lnFileSize = FSEEK(lnFileHandle,0,2)
= FCLOSE(lnFileHandle)


David W. Grewe Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top