adik2dmax666 Posted February 1, 2010 Posted February 1, 2010 How can i add the current date (@MON & "/" & @MDAY & "/" & @YEAR) to my .txt file's name? So my file would look something like this ex. minsyst_02/03/2010.txt I'm still using this code FileWriteLine("minsyst.txt",$test1) Thanks First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack. -George Carrette[sub]GD Keylogger Creator (never released)[/sub][sub]Garena Autojoin v3.0[/sub]
whim Posted February 1, 2010 Posted February 1, 2010 Hi ! try $FileName = "minsyst_" & @MON & "-" & @MDAY & "-" & @YEAR & ".txt" ;$FileName = "minsyst_" & @YEAR & "-" & @MON & "-" & @MDAY & ".txt" note that you can't use slashes as separators, and that the commented version will make it easier to sort by date whim
Mikesch Posted February 1, 2010 Posted February 1, 2010 You mustn't use "/" as the delimiter, try something like: $dat = (@MON & "-" & @MDAY & "-" & @YEAR) $file = FileOpen("d:\minsyst_"& $dat &".txt", 1) FileWrite($file, "whatever") FileClose($file)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now