Is it possible to read the contents of a text file without having a dialog box displayed?
yes
for example, you could do
var vPath = 'C:\\test.txt';
var vFile = plugins.file.convertStringToJSFile(vPath);
var vContent = plugins.file.readTXTFile(vFile);
Your example still opens a dialog. How do you import a text file without a dialog? Anybody know? Ive searched the forums with no luck.
Thank you,
Steve
You only get a dialog if the file does not exist, make sure it exists.
Thanks! Thought I was going crazy. I had to make sure on the path to put / for the backslashes like “c:/imports/filename.csv”
I’m working with Japanese too and you don’t see a \ , its a yen sign (can’t paste it because it blows up your forums ) which further messes me up.
Thanks
Steve
I think if you use just forwardslashes it will always work.