T Todd Huttenstine Aug 21, 2004 #1 How do you delete the following folder programmatically? C:\test Thank you Todd Huttenstine
T Todd Huttenstine Aug 21, 2004 #2 Hey guys, I got it. Below is what I did to delete a folder. In this case I changed the folder I wanted to delete to SMS Raw Data. Dim FS As Object Set FS = CreateObject("Scripting.FileSystemObject") FS.deletefolder ("C:\Documents and Settings\" & NN & "\Desktop\SMS Raw Data") Todd
Hey guys, I got it. Below is what I did to delete a folder. In this case I changed the folder I wanted to delete to SMS Raw Data. Dim FS As Object Set FS = CreateObject("Scripting.FileSystemObject") FS.deletefolder ("C:\Documents and Settings\" & NN & "\Desktop\SMS Raw Data") Todd
S Soo Cheon Jheong Aug 22, 2004 #3 Todd, Try - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sub Delete_Folder() Dim FS As Object Dim str_F As String str_F = "C:\Test" Set FS = CreateObject("Scripting.FileSystemObject") If FS.FolderExists(str_F) Then FS.DeleteFolder str_F MsgBox "Folder deleted" End If End Sub - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- Regards, Soo Cheon Jheong _ _ ^¢¯^ --
Todd, Try - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sub Delete_Folder() Dim FS As Object Dim str_F As String str_F = "C:\Test" Set FS = CreateObject("Scripting.FileSystemObject") If FS.FolderExists(str_F) Then FS.DeleteFolder str_F MsgBox "Folder deleted" End If End Sub - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- Regards, Soo Cheon Jheong _ _ ^¢¯^ --