Jump to content


Photo

Create a blank txt file in directory


  • Please log in to reply
1 reply to this topic

#1 Tommo020788

Tommo020788

    GMC Member

  • New Member
  • 67 posts

Posted 29 July 2012 - 01:42 PM

Hi there,
I know how to open, and edit an existing text file, or copy an existing text file to a location,
but I don't know how to create a blank text file using GML code.

I want to create a blank text file called "confirm_file.txt"
What would be the coding to create a blank text file from scratch?
  • 0

#2 psycho666

psycho666

    GMC Member

  • GMC Member
  • 832 posts
  • Version:GM8

Posted 29 July 2012 - 01:45 PM

fid=file_text_open_write("confirm_file.txt")
file_text_close(fid)
It opens the file, it closes the file. The file stays empty.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users