Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining file size
Message
From
02/06/2005 09:59:18
 
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:
01019366
Views:
19
Neil,

Borislav's function will not work unless WSH (Windows Scripting Host) is installed on the computer, something you may have to consider. My function is pure VFP code.

>Nope the full code is:
>
>
>loFSO = Createobject("Scripting.FileSystemObject")
>filepath = 'U:\questpdm\picture\whatever.jpg'
>loFile = loFSO.Getfile(filePath)
>
>IF transform(loFile.Size)<= '500000'
>	MESSAGEBOX("File Size is OK")
>	ELSE
>	MESSAGEBOX("File Size is not OK - File Size="+TRANSFORM(loFile.Size))
>ENDIF
>
>
>The message coming back is File size is not OK. The size of my file is 79KB. If I run this the value of lofile.Size is 79997.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform