Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

save to file - network drive

Status
Not open for further replies.

pugs421

Technical User
Nov 25, 2002
114
US
The follwoing code works fine when the script resides on the c:

<SCRIPT LANGUAGE=JScript>
<!--

function writeToDisk(writeString) {

var fso = new ActiveXObject("Scripting.FileSystemObject");
var a = fso.CreateTextFile("c:\\testFile.txt", true);
a.WriteLine(writeString);
a.Close();
}

//-->
</SCRIPT>

But when I move it to a network drive (z), it will not work.
I have tried making the path "c:\\testFile.txt", and "z:\\testFile.txt",.

but the script only works when it's on the local drive.

Any ideas?
 
You may want to check with your network administrator about security settings because many networks have safeguards against web pages writing to drives. This is to prevent hackers from filling up network drives with garbage.
 

I think it's to do with your ActiveX settings. I don't believe you can run ActiveX controls non-locally by default.

Hope this helps,
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top