* * *

Author Topic: filesize ('\\.\C:')  (Read 463 times)

Uli

  • Newbie
  • Posts: 3
filesize ('\\.\C:')
« on: January 12, 2018, 10:31:41 pm »
Hi,

how can I get filesize ('\\.\C:')
(Size of drive C:) with Lazarus v1.4.4 under Win XP SP3 ?

filesize ('\\.\C:') returns -1.

var f: file of byte;
...
assignfile (f, '\\.\C:')
size := filesize (f);
causes Run-Time error : 087

Thanks.

Uli

ASerge

  • Hero Member
  • *****
  • Posts: 527
Re: filesize ('\\.\C:')
« Reply #1 on: January 12, 2018, 10:37:54 pm »
filesize ('\\.\C:') returns -1.
It's not a file, it's a disk. May be DiskSize(3);?

Uli

  • Newbie
  • Posts: 3
Re: filesize ('\\.\C:')
« Reply #2 on: January 12, 2018, 10:54:48 pm »
thanks, it works.

Uli

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus