Hi,
I use FSO ActiveXObject to save file from IE. In JS like
function saveToFile(path N, content){
var fso, ts;
var ForWrite = 2;
fso = new ActiveXObject(" Scripting.FileS ystemObject");
ts = fso.OpenTextFil e(pathN, ForWrite, true);
ts.Write(conten t);
ts.close();
if (!fso.FileExist s(pathN)) {
alert("The file <"+pathN+"> cannot be created.");
} else {
alert("Successf ully saved");
}
}
surprisingly if the pathN contains unexisting path and the file is not
created, the fso.FileExists( pathN) still returns true (the message
"Successful ly saved" is written...).
What's wrong there ?
Martin
I use FSO ActiveXObject to save file from IE. In JS like
function saveToFile(path N, content){
var fso, ts;
var ForWrite = 2;
fso = new ActiveXObject(" Scripting.FileS ystemObject");
ts = fso.OpenTextFil e(pathN, ForWrite, true);
ts.Write(conten t);
ts.close();
if (!fso.FileExist s(pathN)) {
alert("The file <"+pathN+"> cannot be created.");
} else {
alert("Successf ully saved");
}
}
surprisingly if the pathN contains unexisting path and the file is not
created, the fso.FileExists( pathN) still returns true (the message
"Successful ly saved" is written...).
What's wrong there ?
Martin
Comment