Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File Size Detection
Message
 
To
04/06/2001 03:24:07
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00514425
Message ID:
00514498
Views:
16
>>Hi all,
>>
>>Are there any command in VFP to detect the file size of a given file?
>>
>>Thank a lot!!
>
>Hi Jimi,
>At least 2 ways :
>
>
set comp on
>? fsize(lcFileName)
>set comp off
>
>adir(arrFile,lcFileName)
>? arrFile[1,2]
Cetin

...and as Dragan would point out< g >, at least a third
oFSO = CREATEOBJECT('Scripting.FileSystemObject')
oFile = oFSO.GetFile(lcFileName)
? oFile.Size
BTW, Carl Warner forwarded me a question on this subject. The basis for it was that, apparently ADIR() does not properly report the file size on files greater than 1 gb. Unfortunately, I haven't been able to test it, if you or anyone can, I'd appreciate hearing the results.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform