Recent

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

Uli

  • Newbie
  • Posts: 5
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: 2223
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: 5
Re: filesize ('\\.\C:')
« Reply #2 on: January 12, 2018, 10:54:48 pm »
thanks, it works.

Uli

 

TinyPortal © 2005-2018