PDA

View Full Version : سایز درایو



neda azadi
جمعه 28 اردیبهشت 1386, 14:23 عصر
سلام
من یک تکه کد مربوط به نشان دادن حجم آزاد یک درایو می خوام . توی تاپیک های دیگه گشتم ولی چیزی پیدا نکردم

m-khorsandi
جمعه 28 اردیبهشت 1386, 16:20 عصر
get the free disk space (http://www.swissdelphicenter.com/en/showcode.php?id=238)
get the free, total size of a disk disk volume (http://www.swissdelphicenter.com/en/showcode.php?id=654)

Vahid_moghaddam
شنبه 29 اردیبهشت 1386, 13:48 عصر
از تابع DiskFree استفاده کنید.


var




S: string;

AmtFree: Int64;
Total: Int64;
begin
AmtFree := DiskFree(0);
Total := DiskSize(0);
S := IntToStr(AmtFree div Total) + 'percent of the space on drive 0 is free: ' (AmtFree div 1024) + ' Kbytes free. ';
Label1.Caption := S;

end;