Jump to content
Sign in to follow this  
Guest Resonance

quick question

Recommended Posts

Guest Resonance

how do I get autoit to save a Filewrite to a different folder? It always seems to save to where ever the script was run from.

Share this post


Link to post
Share on other sites

Just specify the folder....

$file = FileOpen("c:\mydir\test.txt", 1)

; Check if file opened for writing OK
If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf

FileWrite($file, "Line1")
FileWrite($file, "Still Line1" & @CRLF)
FileWrite($file, "Line2")

FileClose($file)
Edited by Helge

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...