如何仅使用javascript删除本地文件夹

问题描述:

Hi,
I want to delete an empty/non-empty directory from my local system and i have restriction that i need to do that only using javascript functions.I cannot refer to functions like 'FileSystemObject'
Please help!





我尝试了什么:



我无法找到任何纯粹的javascript函数来删除我的任何文件夹本地系统。我在网上找到的所有例子都使用'FileSystemObject。

当使用'FileSystemObject'时,我收到错误消息,例如'FileSystemObject未定义'或引用错误。



What I have tried:

I am not able to find any purely javascript function to delete any folder in my local system.All examples i found online are using 'FileSystemObject.
when using 'FileSystemObject',i am getting error message like 'FileSystemObject is not defined' or reference error.

短裤回答:你不能。

这是一个安全功能。

否则,网页上的任何页面都可以删除本地硬盘上的目录。

A.恶意软件的梦想。
Shorts answer: You can't.
It is a security feature.
Otherwise, any page on web would be able to delete directories on your local HDD.
A malware dream.