Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining file size
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01019302
Message ID:
01019303
Views:
21
Here is one way:
loFSO = Createobject("Scripting.FileSystemObject")
loFile = loFSO.Getfile("c:\windows\system32\scrrun.dll")
?"Date created: " + transform(loFile.DateCreated)
?"Date last accessed: " + transform(loFile.DateLastAccessed)
?"Date last modified: " + transform(loFile.DateLastModified)
?"Drive: " + transform(loFile.Drive.path)
?"Name: " + transform(loFile.Name)
?"Parent folder: " + transform(loFile.ParentFolder.name)
?"Path: " + transform(loFile.Path)
?"Short name: " + transform(loFile.ShortName)
?"Short path: " + transform(loFile.ShortPath)
?"Size: " + transform(loFile.Size)
?"Type: " + transform(loFile.Type)
>How can i programmatically determine the size of a file in KB? I want to pass a file as a parameter and determine the size. If the size is below 500KB do this if greater then do that.
>
>Many Thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform