For the life of me I can't seem to get the current date + time + log.txt to work when I try to create a file..
I just want the created file to be named "mm/dd/yyyy-hr:mm:seconds-log.txt
This is my code:
$_filename = @MON & "/" & @MDAY & "/" & @YEAR & "-" & @HOUR & ":" & @MIN & ":" & @SEC & "-log.txt" ;MsgBox(1, "date", $_filename) $_file = FileOpen($_filename, 2) If $_file == -1 Then MsgBox(4096, "Critical Error", "Couldn't Create Log File!") exit Endif
I first tried _Now() and _NowDate() and _NowTime(), They all set the variable to the date and time + log.txt but when I try to create the file it throws the error msg EVERYTIME!!!
Where is my error?