RmDir

Delete a folder, expects to be an empty folder, path must be already MapPathed

<%
Private Sub RmDir(byVal path)
 Dim objFSO, boolErr, strErrDesc
 boolErr = False
 On Error Resume Next
 Set FSO = Server.CreateObject("scripting.filesystemobject")
 FSO.DeleteFolder path
 if Err Then
  boolErr = True
  strErrDesc = Err.Description
 end if
 Set FSO = Nothing
 On Error GoTo 0
 if boolErr then Err.Raise 5100, "RmDir Statement", strErrDesc
End Sub
%>

path

<% RmDir &#34;C:\New Folder&#34; %><br/><% RmDir server.mappath(&#34;/New Folder&#34;) %>

Views 215 Downloads 68

'FSO', 'RmDir', 'rd', 'remove', 'delete', 'folder', 'directory', 'empty', 'NotMyWork'

ANmarAmdeen
313
File System Classic ASP
Revisions

v1.0

Needs