0

I have a folder D:\test1 and I have another folder inside that whose name is not known.

I tried using rmdir /s "D:\test\*", but it is showing an error.

I just want to know is there any way of doing this operation?

In shell script if we give rmdir "D:\test1\*" it will remove all directories inside test1.

I am looking for the command in batch syntax.

4

1 回答 1

0

我建议

@echo off
for /D %%F in ("D:\test1\*") do rmdir /S /Q "%%F"

D:\test1即使子文件夹在文件夹名称中包含一个或多个空格,它也会递归删除所有子文件夹。

于 2014-11-26T06:55:11.997 回答