none
2 file read RRS feed

Answers

  • Save the following somewhere and run it and the files will be created in that folder with the contents.

    text1 = "My text 1"
    text2 = "My text 2"
    File.WriteContents(Program.Directory+"\test1.txt",text1)
    File.WriteContents(Program.Directory+"\test2.txt",text2)

    To read from these 2 files:

    text1 = File.ReadContents(Program.Directory+"\test1.txt")
    text2 = File.ReadContents(Program.Directory+"\test2.txt")

    Then output these in a single file:

    output = text1+Text.GetCharacter(13)+Text.GetCharacter(10)+text2
    TextWindow.WriteLine(output)
    File.WriteContents(Program.Directory+"\test3.txt",output)
    The GetCharacter bits are just a new line between the 2 bits of text.

    Saturday, February 2, 2013 10:14 AM
    Moderator