FileSystemObject.DeleteFolder() : FileSystemObject : MS JScript JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » MS JScript » FileSystemObject »

 

FileSystemObject.DeleteFolder()











Syntax








filesystemobject.DeleteFolder(foldername, force)



The DeleteFolder() method removes an existing folder and all its contents.

foldername is a string specifying the folder name.

force is a Boolean value indicating whether to delete a file with read only permissions.












<html>
    <body>
    <script language="JScript">
    <!--
    function deleteFolder()
    {
        var myObject;
        myObject = new ActiveXObject("Scripting.FileSystemObject");
        myObject.DeleteFolder("c:\newtmp");
    }
    -->
    </script>
    Delete Folder: "newtmp"
    <form name="myForm">
    <input type="Button" value="Click to Delete Folder" onClick='deleteFolder()'>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo MS JScript
» FileSystemObject