| Author |
Need File size and modified date
|
|
| ksvimal 2007-02-07, 8:06 am |
| Hi,
I need some files( xxxxx.pbd) size and last modified date by using
file path.
How can i find. Is there any API or external functions...please send
me the solution.......
| |
|
|
|
|
|
|
| leeline99 2007-02-12, 3:17 am |
| quote: Originally posted by ksvimal
Hi,
I need some files( xxxxx.pbd) size and last modified date by using
file path.
How can i find. Is there any API or external functions...please send
me the solution.......
You dont say what version of PB you are using, but in 10.5 (I think they were available in PB10 too) there are a couple of built in functions that return the files size.
From the online help
FileLength ( filename )
Argument
filename
Description
A string whose value is the name of the file for which you want to know the length. If filename is not on the current application library search path, you must specify the fully qualified name.
Usage
Call FileLength before or after you call FileOpen to check the length of a file before you call FileRead. The FileRead function can read a maximum of 32,765 bytes at a time.
The length returned by FileLength always includes the byte-order mark (BOM). For example, suppose the hexadecimal display of the file SomeFile.txt is FF FE 54 00 68 00 69 00 73 00, then the following statement returns 10,which includes the BOM:
ll_length = FileLength("SomeFile.txt")
The FileLength function cannot return the length of files whose size exceeds 2GB. Use FileLength64 to find the length of larger files. | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|