递归访问目录树中的目录
for /r
命令可用于递归访问目录树中的所有目录并执行命令。
@echo off
rem start at the top of the tree to visit and loop though each directory
for /r %%a in (.) do (
rem enter the directory
pushd %%a
echo In directory:
cd
rem leave the directory
popd
)
笔记: