I need to delete a folder off the "c" drive that I created. I wanted to see if anyone could help with writing a script to remove this. Thanks

Answer Summary:
Below is the VBScript: Option Explicit On Error Resume Next Dim wshShell, DelFolder Set wshShell = CreateObject("Scripting.FileSystemObject") Set DelFolder = wshShell .GetFolder("C:\Folder\") DelFolder.Delete Set wshShell = nothing
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

3

RD "C:\Folder to delete" /S /Q

/S Removes all directories and files in the specified directory in addition to the directory itself.  Used to remove a directory tree.

/Q Quiet mode, do not ask if ok to remove a directory tree with /S

Answered 05/11/2012 by: andemats
Second Degree Black Belt

Please log in to comment

Answers

0

What technologies do you have available? Are you just talking about removing the folder from one machine or multiple? Are you working with the K1000 and want to write a script using it?

Please consider adding the appropriate tags to your post that will help others answer your question and also find it later if they have the same question later.

Answered 05/11/2012 by: chucksteel
Red Belt

Please log in to comment
0

Ues this VBScript:

Option Explicit

On Error Resume Next

Dim wshShell, DelFolder 

   Set wshShell = CreateObject("Scripting.FileSystemObject")

   Set DelFolder = wshShell .GetFolder("C:\Folder\")

DelFolder.Delete 

Set wshShell  = nothing
 
Answered 05/11/2012 by: akki
Fourth Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity

Share