none
Creating a File?

    Question

  • Hi,

    I am just wondering if it is possible to create a file like a .txt file. You can create a directory so why not .txt file?


    I love coding. This is signature is 100% Original. :)

    Tuesday, February 14, 2017 6:27 PM

Answers

All replies

  • File.WriteContents with a file name ending in .txt
    Tuesday, February 14, 2017 6:43 PM
    Moderator
  • Can you help me here. WriteContents takes 2 Arguments but I am only supplying 1 what do I add?

    TextWindow.Write("Bank Total: ")
    bankTotalInput = TextWindow.ReadNumber()
    
    Path = Program.Directory
    Directory_Path = Path + "\resources"
    File_Path = Directory_Path + "text.txt"
    Get_Path = File.GetDirectories(Directory_Path)
    If Get_Path = "FAILED" Then
      File.CreateDirectory(Directory_Path)
      File.WriteContents(File_Path + bankTotalInput)
      EndIf
    


    I love coding. This is signature is 100% Original. :)

    Tuesday, February 14, 2017 6:54 PM
  • Change the + in that line to a comma ,

    Jan [ WhTurner ] The Netherlands

    Tuesday, February 14, 2017 6:57 PM
    Answerer
  • Worked, but it's calling it resourcetext.txt and doesn't put it in the resources folder.

    I love coding. This is signature is 100% Original. :)

    Tuesday, February 14, 2017 7:04 PM
  • It is simply:

    File_Path = Directory_Path + "\text.txt"
    Tuesday, February 14, 2017 7:24 PM
    Moderator