Re: Adding variables to AssignFile command
Posted by webmaster Guido on May 21, 2003 : Hi there, I am trying to create a file at runtime with the code : AssignFile(FOut,'C:\emails\john.txt'); : This works fine, what I need to do is stick a variable in there so that each file I create has a different filename. I tried : AssignFile(FOut,'C:\emails\'+dateToStr(date)+'.txt'); : but it came up with "Invalid Filename" when I tried to open the file with : rewrite(FOut); : Any help would be great :) DateToStr() gives a string containing the character /
[ DelphiLand: free Delphi source code, tips, tutorials ] |
|