Hi all,
I found a strange behavior trying to save in a txt files twice.
The first one works fine, but when I try to save again at the same txt file, the file can't be updated.
More over, I tried deleting the txt file but then the application cannot creates the file again.
piece of code
outputProcess := TStringList.Create;
memStream:=TMemoryStream.Create;
P := TProcess.Create(nil);
.
.
.
p.Output.Read((memStream.Memory+BytesRead)^,READ_BYTES);
.
.
.
outputProcess.LoadFromStream(memStream);
outputProcess.SaveToFile(pathLogs+PathDelim+'xxxx.txt');
.
.
finally
P.Free;
outputProcess.Free;
memStream.Free;
Can someone see what is wrong ?
Thanks in advance!
Nicolas