Board index » delphi » How to get the filesize of a file without using AssignFile command Help ???+

How to get the filesize of a file without using AssignFile command Help ???+

Is there another way of getting the
filesize of a file without using the
AssignFile(f) and the Filesize(f) commands.

Because I cannot use these commands on files that
are in use or open.

Please E-mail me @

dove...@sn.no

 

Re:How to get the filesize of a file without using AssignFile command Help ???+


Quote
Dag ?verby wrote:

> Is there another way of getting the
> filesize of a file without using the
> AssignFile(f) and the Filesize(f) commands.

> Because I cannot use these commands on files that
> are in use or open.

Look for FindFirst in the Delphi online Help.  It should enable you to
get the size of a file in the TSearchRec structure that it returns.

Alain Toutant

Re:How to get the filesize of a file without using AssignFile command Help ???+


Quote
Dag ?verby <dove...@sn.no> writes:
> Is there another way of getting the
> filesize of a file without using the
> AssignFile(f) and the Filesize(f) commands.

Take a look at 'findfirst' and 'findnext'.

Quote
> Because I cannot use these commands on files that
> are in use or open.

You should get '0' as filesize, if the file is been written to, though...

Quote
> dove...@sn.no

/\/\ichael

--
   * Michael Rittweger,  Nissenstr. 12,  24148 Kiel,  +49-431-7209360 *
         2:240/2120 @ fidonet, +49-431-7209361 (Mailer, FAX, BBS)
               <url:http://www.users.comcity.de/%7Ezaphod/>

Other Threads