Forum Discussion

Elvir_QT's avatar
Elvir_QT
New Contributor
13 years ago

aqFile.ReadWholeTextFile()

Hi everyone



I wonder if its possible in the "aqFile.ReadWholeTextFile()" to  declare a variable that conatins the path as a value instead of writing the entire search path to the text file?



In my case I have function that reads the search path to the text file from a config.ini file.





I have tried to search the forums for an answer but without any luck.  



Any help is appreciated




2 Replies

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)
    Hi Elvir,



    Do you mean something like this?

    strFileName = "C:\Test\MyFile.txt"

    strText = aqFile.ReadWholeTextFile(strFileName, aqFile.ctANSI)


    strPath = "C:\Test\"

    strText = aqFile.ReadWholeTextFile(strPath & "MyFile.txt", aqFile.ctANSI)
  • Elvir_QT's avatar
    Elvir_QT
    New Contributor
    Thanks for your help Helen. I got the script working now. Your examples were exactrly what I needed.