How to Create a New Folder for Downloading a File

我的梦境 提交于 2019-12-01 22:32:53

You can use FSO.js, but be warned that it currently only works in Chrome. Additionally, the folders you create can only really be accessed from within your webapp (for example, you can't choose to write a specific folder on the C drive).

MGot90

Firstly, You can't really interact with the local system or the server with JavaScript because of security. You can call a server-side script with JavaScript, via AJAX.

If you don't care, you can check out Javascript FSO CreateFolder Method

JavaScript Example...

// initialize ActiveXObject and create an object of Scripting.FileSystemObject.  
var fso = new ActiveXObject("Scripting.FileSystemObject");  

// creates a folder with specified name at the specified location  
fso.CreateFolder("C:\\Temp\\myFolder");  

fso = null;  
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!