将以下代码复制保存至txt文件中,将文件后缀改为bat即可
@echo off
:h
setlocal enabledelayedexpansion
for /d %%a in (%1*) do (
set p="%%a"
set p=!p:."=.."!
rd !p! || ( call :h !p! & rd !p! )
)
@echo off
:h
setlocal enabledelayedexpansion
for /d %%a in (%1*) do (
set p="%%a"
set p=!p:."=.."!
rd !p! || ( call :h !p! & rd !p! )
)