Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 260
Default Delete Folder

How do you delete the following folder programmatically?

C:\test


Thank you
Todd Huttenstine
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 260
Default 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
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default 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
_ _
^ąŻ^
--




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UNABLE TO DELETE FOLDER hitesh Excel Discussion (Misc queries) 4 January 26th 10 12:26 AM
Time based file/folder delete don Excel Discussion (Misc queries) 1 March 30th 09 02:20 PM
delete all the contents (sub folders and files) in the temp folder Joseph Excel Discussion (Misc queries) 0 June 6th 05 08:01 AM
delete folder Janelle Excel Programming 3 February 5th 04 08:51 PM
fso delete folder shockley Excel Programming 5 December 24th 03 04:43 PM


All times are GMT +1. The time now is 03:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"