Czesc
Moze Ci to cos wyjasni wyciagnełem z helpa bcb :
Returns the size, in bytes, of a specified drive :
DiskSize returns the size in bytes of the specified drive, where 0 = Current, 1 = A, 2 = B, etc. DiskSize returns -1 if the drive number is invalid.
Returns the number of free bytes on a specified drive.
DiskFree returns the number of free bytes on the specified drive, where 0 = Current, 1 = A, 2 = B, and so on.
i przykłady :
The following example displays in a dialog the disk free space of the current drive with commas as thousand separators.
ShowMessage(FormatFloat("#,##0 bytes", DiskFree(0)));
This example uses a form with a label on it. When the following code executes, it displays a message in the label indicating the number of KB free, and what percentage of the entire disk space that represents.
__int64 AmtFree = DiskFree(0);
__int64 Total = DiskSize(0);
AnsiString S;
S.sprintf("%I64d percent of the space on drive 0 is free: %I64d KB", AmtFree*100/Total, AmtFree/1024 );
Label1->Caption = S;
Powodzenia [cya]