Jump to content

Recommended Posts

Posted

$fHandle = FileOpen("file.txt", 2)

FileWriteLine($fHandle, @ComputerName)

FileClose($fHandle)

FileOpen will create the file if it does not already exist. The '2' erases any previous contents of the file, and sets the pointer to the first character position in the file.

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Posted

Thanks a bunch that saves me a ton of time

$fHandle = FileOpen("file.txt", 2)

FileWriteLine($fHandle, @ComputerName)

FileClose($fHandle)

FileOpen will create the file if it does not already exist.  The '2' erases any previous contents of the file, and sets the pointer to the first character position in the file.

<{POST_SNAPBACK}>

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
  • Recently Browsing   0 members

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