Delete Folder
How do you delete the following folder programmatically?
C:\test Thank you Todd Huttenstine |
Delete Folder
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 -----Original Message----- How do you delete the following folder programmatically? C:\test Thank you Todd Huttenstine . |
Delete Folder
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 _ _ ^вп^ -- |
All times are GMT +1. The time now is 04:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com