Function Escreve_Arq(NomeArq,Texto : String ) : Boolean;
var
sArquivo : tStrings;
Begin
Try
sArquivo:=tStringList.Create;
sArquivo.LoadFromFile(NomeArq);
sArquivo.Add(string);
sArquivo.SaveToFile(NomeArq);
result:=True;
except
result:=False;
end
End;
Ex. de uso:
If Escreve_Arq('c:\Teste.txt','Nova Linha de Texto') then
ShowMessage('Arquivo alterado com sucesso !!')
else
ShowMessage('Erro ao alterar arquivo');
This entry was posted
on 11:11
and is filed under
DELPHI
.
You can leave a response
and follow any responses to this entry through the
Assinar:
Postar comentários (Atom)
.