Fórum Reconheçer Tamanho do Arquivo #211195
02/02/2004
0
se o arquivo ´c:\temp\teste.txt´ existir e tiver o tamanho de ´128k´ entao
inicio
Comando
Fim
//--
Pessoal se alguem souber como mandar e-mail com anexo atraves do Delphi usando o componente idSMTP da Paleta Indy Clients, por favor me mandem um e-mail, ou poste aqui. :roll:
e-mail: jeronimodedeus@terra.com.br
Spooner
Curtir tópico
+ 0Posts
03/02/2004
Fabio.hc
procedure TForm1.Button2Click(Sender: TObject); begin if (fileexists(´c:\temp\teste.txt´ )) and ((TFileStream.Create(´c:\temp\teste.txt´, fmOpenRead or fmShareExclusive).Size)/1000 = 128) then Begin ... End; end;
Quanto e-mail não uso o Indy, ainda.
Gostei + 0
03/02/2004
Spooner
:wink:
Gostei + 0
04/02/2004
Fabio.hc
procedure TForm1.Button1Click(Sender: TObject); var TamArq:integer; begin if (FileExists(´c:\temp\teste.txt´ )) then begin with TFileStream.Create(´c:\temp\teste.txt´, fmOpenRead or fmShareExclusive) do begin TamArq := Size; Free; end; if (TamArq/1000 = 128) then begin ... end; end; end;
Gostei + 0
04/02/2004
Spooner
Obrigado pelo Codigo funcionou do jeito que eu estava prescisando..
Valew..
:wink:
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)