最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

html - Modifying Local Files Using HTML5 and JavaScript - Stack Overflow

programmeradmin10浏览0评论

Is there any way I can use HTML5 and JavaScript to modify a file on my system? I'm OK with running Chrome or Firefox with specific options or opening permissions in some other way.

Ideally I would like test this by having my browser rename a file on my desktop.

Is there any way I can use HTML5 and JavaScript to modify a file on my system? I'm OK with running Chrome or Firefox with specific options or opening permissions in some other way.

Ideally I would like test this by having my browser rename a file on my desktop.

Share Improve this question edited Jun 23, 2011 at 17:32 Kirk Ouimet asked Jun 23, 2011 at 15:55 Kirk OuimetKirk Ouimet 28.4k44 gold badges130 silver badges182 bronze badges 2
  • possible duplicate of Write local file with jQuery or Javascript – mplungjan Commented Jun 23, 2011 at 16:01
  • It would be sad, but acceptable =] – Kirk Ouimet Commented Jun 23, 2011 at 19:46
Add a ment  | 

3 Answers 3

Reset to default 6

Yes, you can do this, this link details some of the available functionality:

http://www.html5rocks./en/tutorials/file/filesystem/

Just remember, it's not supported in the major browsers yet, and it's likely when it is many of your visitors will not upgrade for quite some time.

No, as this would be a security vulnerability. As pointed out there are sandboxed file systems, or local database storage in HTML5, but not access to the whole file system.

You could achieve it with a certified Java applet, if you really wanted to achieve it through the browser. To be honest the browser is not the best place to be trying such things.

VBScript should be appropriate in your case. You will have to lower your internet zone security level though.
Once it's done just use ActiveXObject("Scripting.FileSystemObject") and its MoveFile method.

发布评论

评论列表(0)

  1. 暂无评论