faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

22 of 80 people (28%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How do I create a file on the Desktop using JScripts CreateTextFile?

Apr 4th, 2008 20:33
ha mo, Dave Clark, Colin Fraser, OneDogAmI,


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
OneDog,
     Since you specified JScript (not the more generic "JavaScript" 
term), nothing else needs to be said except to inform you that 
CreateTextFile (which is a method of MS "FSO" -- File System Object) 
cannot be used from an Internet-based web page.  The reason is due to 
security issues.  In their wisdom to also support intranets and local 
HTML document use, though, IE and JScript may use FSO locally as 
follows:
var fso = new ActiveXObject("Scripting.FileSystemObject");
     For more information, follow this link:
http://msdn2.microsoft.com/en-us/library/z9ty6h50.aspx
Take care,
Dave Clark
www.DaveClarkConsulting.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com