Forums > Javascript

problem reading and writing files in subdirectories from javascript


June 9, 2014 | 1:14 am

Hello

I would like to read and write text files from javascript. I would like the text files to be located in a subdirectory, but even if I specify a proper file path, the text file writes in the same directory as the javascript file.
Do I miss something?

my test function:
function test()
{
var f = new File(‘/testdir/testfile.txt’,’write’,’TEXT’);
f.writestring(‘test’);
f.close();
}

// the file ‘testfile.txt’ appears in the same directory as the js file, not in the testdir subdirectory.

Thanks

January 2, 2015 | 1:37 pm
Viewing 2 posts - 1 through 2 (of 2 total)

Forums > Javascript