I'm trying to delete all subdirectories within %path% except for the subdirectory foobar, using a batch file:
for /D %%d in ("%path%\*") do if NOT "%%d" == "foobar" rd /S /Q "%%d"
However, all subdirectories in %path% are being deleted, including foobar.
What can be happening?
Aucun commentaire:
Enregistrer un commentaire