..


Sponsored Links

DeleteFolder

The method of the FileSystemObject object DeleteFolder delete the folder or folders. If the folder does not exist will return an error.
The method accepts two parameters DeleteFolder:

  • foldername - the name of the folder to delete files or folders (wildcards are permitted);
  • Force - optional parameter; Boolean value that indicates whether read-only folders will be deleted. True indicates that the read-only folders will be deleted, while False indicates that the folders are not deleted. The default is False.
Example:





 Dim fs







 'I create an instance of the FileSystemObject

 





 Set fs = Server.CreateObject ("Scripting.FileSystemObject")









 'Check if folder exists ...







 If fs.FolderExists ("c: \ temp") then



  



 'Cancel if there is



  



 fs.DeleteFolder ("c: \ temp")







 End if









 'I cleaned







 Set fs = Nothing



In the same category ...
E-Learning
ASP (Advanced) ASP (Advanced)
Full course for creating dynamic Web sites. From 39 €.
ASP Zero (Ebook) ASP Zero (Ebook)
Learning Microsoft ASP and VBScript from scratch. At only 29 €.
ASP and Access (Ebook) ASP and Access (Ebook)
Managing a MS Access database with ASP. At only 29 €.
Sponsored Links