vb Delete a folder

Sub DeleteFolder(strFolderName)
	Dim filesystem

	strFolderName = Server.Mappath(strFolderName)
	set filesystem = Server.CreateObject("Scripting.FileSystemObject")
	
	If filesystem.FolderExists(strFolder) then
		call filesystem.DeleteFolder(strFolder)
		Response.Write "

Folder " & strFolderName & " has been deleted!

" Else Response.Write "

Folder " & strFolderName & " does not exist!

" End If Set filesystem = nothing End Sub
Deletes a folder if it exists.

Updated: Saturday 2nd October 2010, 11:21am

There are 0 comments

Leave a comment of your own

Comments are currently closed.