caw01
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.
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.
wild cards are not permited with this command, you will need a different utility
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That solution is also in the Link I posted.
ASKER
I used the the vb script, but the other command woul dprobably have worked too...