retep
asked on
Problem with saving to textfile
Why does my file end up in c:\documents instead of the folder of my program???
My procedure looks like this:
Procedure TForm1.SaveMyFile;
Var
F : TextFile;
Begin
AssignFile(F,'myFile.txt') ;
Rewrite(F);
Try
writeLn(F,'bla bla');
.
.
.
finally
CloseFile(F);
end;
end;
Hope you can help me :)
Retep
My procedure looks like this:
Procedure TForm1.SaveMyFile;
Var
F : TextFile;
Begin
AssignFile(F,'myFile.txt')
Rewrite(F);
Try
writeLn(F,'bla bla');
.
.
.
finally
CloseFile(F);
end;
end;
Hope you can help me :)
Retep
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks :)
The reason is not in the procedure above. Maybe there is a value 'Start in: c:\documents' in the shortcut. Maybe you change current directory somewhere in the code before saving the file.
Regards, Geo