I am making a hypertext application (hta) that will be downloaded and put into who-knows-what directory by the user.
I want to output a text file to whatever directory they put the hta into. But how can I get the directory path?
This is what I am trying to do:
fso = new ActiveXObject("Scripting.FileSystemObject");
ts = fso.CreateTextFile("*current directory*", true);
//do stuff; save stuff
I can specify the path name and it works, but that is useless for what I am trying to do.
Things I have tried:
1) Simply naming the file: ts=fso.CreateTextFile("output.txt",true)
2) using document.location.pathname
This returns the path of the .hta file, so I use replace("myhta.hta","output.txt");
But then I get a path not found error.
This has to be simple, but I can't get it. Thanks for any help you can give.
Frustrated in New Orleans