Tamanho do arquivo!

Delphi

28/09/2003

Galera,
como saber o tamnaho em kb de um determinado arquivo?



Valew


Lipsil

Lipsil

Curtidas 0

Respostas

Lipsil

Lipsil

28/09/2003

eu já consegui um aqui q mostra os bytes, e entao pra passar pra kb teria q dividir por 100, ma não é possivel de se dividir do valor dando um aviso de q string e integer nao sao compativeis..... o q fazer?


valew


GOSTEI 0
Japa

Japa

28/09/2003

Amigo achu que isso ajuda voce:
function TamArquivo(Arquivo: string): Integer; begin with TFileStream.Create(Arquivo, fmOpenRead or fmShareExclusive) do try Result := Size; finally Free; end; end; Utilize a função assim: procedure TForm1.Button1Click(Sender: TObject); begin edit1.text:= inttostr(TamArquivo(´CAMINHO\NOMEDOARQUIVO´)); end;



GOSTEI 0
POSTAR