Fórum Espaco livre HD #205067
08/01/2004
0
Gostaria de saber como obter o espaço total e o livre do HD.
Obrigado.
Obrigado.
M@rcio
Curtir tópico
+ 0
Responder
Posts
08/01/2004
Nigro
var SetoresPorAgrup, BytesPorSetor, AgrupLivres, TotalAgrup: DWord;
begin
Memo1.Clear;
if GetDiskFreeSpace(´C:\´, SetoresPorAgrup, BytesPorSetor, AgrupLivres, TotalAgrup) then with Memo1.Lines do begin
Add(´Setores por agrupamento: ´ + IntToStr(SetoresPorAgrup));
Add(´Bytes por setor: ´ + IntToStr(BytesPorSetor));
Add(´Agrupamentos livres: ´ + IntToStr(AgrupLivres));
Add(´Total de agrupamentos: ´ + IntToStr(TotalAgrup));
Add(´----- Resumo -----´);
Add(´Total de bytes: ´ + IntToStr(TotalAgrup * SetoresPorAgrup * BytesPorSetor));
Add(´Bytes livres: ´ + IntToStr(AgrupLivres * SetoresPorAgrup * BytesPorSetor));
end; end;
begin
Memo1.Clear;
if GetDiskFreeSpace(´C:\´, SetoresPorAgrup, BytesPorSetor, AgrupLivres, TotalAgrup) then with Memo1.Lines do begin
Add(´Setores por agrupamento: ´ + IntToStr(SetoresPorAgrup));
Add(´Bytes por setor: ´ + IntToStr(BytesPorSetor));
Add(´Agrupamentos livres: ´ + IntToStr(AgrupLivres));
Add(´Total de agrupamentos: ´ + IntToStr(TotalAgrup));
Add(´----- Resumo -----´);
Add(´Total de bytes: ´ + IntToStr(TotalAgrup * SetoresPorAgrup * BytesPorSetor));
Add(´Bytes livres: ´ + IntToStr(AgrupLivres * SetoresPorAgrup * BytesPorSetor));
end; end;
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)