Features
      Ask DevGuru
      ASP Resources
      Find the Bug
      Knowledge Base
      Links
      Tips of the Week
      Tutorials
  Products
      dgCalendar
      dgCharge New!
      dgChart New!
      dgFileUpload
      dgReport New!
      dgSort
      dgTree
  Site
      Authoring
      Coming Soon
      DevGuru Resume
      Link to Us
      Merchandise
      Sponsorships
      Testimonials
      What's New
  Technologies
      ADO 2.6
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      Transact-SQL Syntax
      VBScript
      WML
      WMLScript
      WSH
      XML DOM

              











METHOD:  FileSystemObject.DeleteFolder

Implemented in version 2.0
 
object.DeleteFolder folder [, force]

This method is used to delete a specified folder or folders (using wildcards), including all of its subfolders and files. The optional force parameter returns a Boolean value - True allows folders with read-only attributes to be deleted, while False (default) does not.

Note that an error also occurs if you try to delete a folder that doesn't exist.

Code:
<%
dim filesys
Set filesys = CreateObject("Scripting.FileSystemObject")
If filesysFolderExists("c:\DevGuru\website\") Then 
   filesysDeleteFolder "c:\DevGuru\website\"
   Response.Write("Folder deleted")
End If
%>

 
Output:
"Folder deleted"


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information