/build/static/layout/Breadcrumb_cap_w.png

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

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


0 Comments   [ + ] Show comments

Answers (3)

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
Posted by: andemats 11 years ago
2nd Degree Black Belt
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

Posted by: chucksteel 11 years ago
Red Belt
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.

Posted by: akki 11 years ago
4th Degree Black Belt
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
 

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Link

Related Links

Post

Related Posts

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ