Jump to content

FileWriteLine


Recommended Posts

$DATE = @MDAY & "/" & @MON & "/" & @YEAR

$file = FileOpen("D:\Report.txt", 1)

If $file = -1 Then

MsgBox(0, "Error", "Unable to open file.")

Exit

EndIf

FileWriteLine($file, "Date: ", $DATE )

FileWriteLine($file, "" & @CRLF)

FileClose($file)

_________________________________________________________________

FileWriteLine($file, "Date: ", $DATE)

^ ERROR

>Exit code: 1 Time: 0.207

________________________________________________________________

please help me i cant put the date function output(spose to be like this "Date: 24/08/2011"

in to the txt file every time do that its give me the error

help me out

Link to comment
Share on other sites

Use:

FileWriteLine($file, "Date:              " & $DATE )

instead of:

FileWriteLine($file, "Date:              ", $DATE )

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...