1 Reply Latest reply on Oct 26, 2011 7:16 PM by crydrk

    Read a .txt file

    crydrk Level 1

      I'm trying to find out how to read a .txt file and simply assign its contents to a variable. Is this possible?


      [Edit] Right after posting I found this page which seems like it might be in the direction I want to go but I haven't checked it out completely yet: http://extendscript.blogspot.com/2009/06/read-tab-delimited-text-file.html

      Just posting the link for future searchers or if anyone will tell me 'Hey! That's not what you're looking for!'

        • 1. Re: Read a .txt file
          crydrk Level 1

          For anyone interested, the simplified answer for me was:

          var fileToParse = File ('path');


          var dataToGet = fileToParse.readln();



          I only needed the one line, so thats why my example above is so simple.