leandropoblet
11 years agoFrequent Contributor
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 bit ridiculous since I'm storing a file and trying to read a file)
var storedFileContent = aqFile["ReadWholeTextFile"](storedFile, aqFile["ctUTF8"]);
Any suggestions?
Thanks in advance,
Leandro
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 bit ridiculous since I'm storing a file and trying to read a file)
var storedFileContent = aqFile["ReadWholeTextFile"](storedFile, aqFile["ctUTF8"]);
Any suggestions?
Thanks in advance,
Leandro
- 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";