I need to write a command in a .bat file that recursively deletes all the folders starting with a certain string. How may I achieve this ?
How about:
for /d %a in (certain_string*) do rd /s %a
This will work from the command prompt. Inside a batch file, you would have to double the %s, as usual:
%
@echo off for /d %%a in (certain_string*) do rd /s %%a