我正在使用下面的批处理文件示例,该示例是从批处理文件中获取的,以监视下载文件夹的添加内容。我想修改它,使其循环遍历所有子文件夹。
有人对如何做到这一点有任何想法吗?
@echo off
if not exist c:\OldDir.txt echo. > c:\OldDir.txt
dir /b "d:\My Folder" > c:\NewDir.txt
set equal=no
fc c:\OldDir.txt c:\NewDir.txt | find /i "no differences" > nul && set equal=yes
copy /y c:\Newdir.txt c:\OldDir.txt > nul
if %equal%==yes goto :eof
rem Your batch file lines go here
Run Code Online (Sandbox Code Playgroud) batch-file ×1