Forum Discussion

leandropoblet's avatar
leandropoblet
Frequent Contributor
11 years ago

Read content of a stored file

Hi there, I'm trying to read the content of a file which for my purposes has to be stored in the project. Now the thing is it woudn't actually read it saying "Type mismatch" (which is a ...
  • HKosova's avatar
    11 years ago
    Hi Leandro,



    What value does the storedFile variable have? It must be the path to the file on the disk.



    If your file is in Stores > Files, you can get its path like this:



    var storedFile = Files["FileNameByName"]("mystoredfile");



    If the file is in the project folder, you can use the following:



    var storedFile = Project["Path"] + "filename.txt";