Link to home
Start Free TrialLog in
Avatar of caw01
caw01Flag for United States of America

asked on

delete multiple directories from command line

Hello,

I am trying to delete a bunch of directories from the command line in Windows.  I am getting  syntax not correct error.  Al of the folders I want to delete begin with IMG.

The command I am running is RD img* /s /q.

If I put in the full folder name, it works, but I need to run this from a batch file and the folder names are always different at the end.
Avatar of michote
michote
Flag of Mexico image

wild cards are not permited with this command, you will need a different utility
ASKER CERTIFIED SOLUTION
Avatar of michote
michote
Flag of Mexico image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of caw01

ASKER

Is that a VB script?  How do I run that?
http://en.wikipedia.org/wiki/VBScript

The short version is you already have it installed, just copy the script on notepad, and give it a .vbs extention. that is it. run it.
SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That solution is also in the Link I posted.
Avatar of caw01

ASKER

I used the the vb script, but the other command woul dprobably have worked too...