把要列目录的文件夹拖到上面的批处理代码文件上即可。复制代码
- @echo off&setlocal enabledelayedexpansion
- call:loop "%~1"
- pause&exit
- :loop
- for /f "delims=" %%i in ('dir "%~1" /ad /b') do (
- set d="%~1\%%i"
- echo !d:"=!
- call:loop "%~1\%%i"
- )
欢迎光临 批处理之家 (http://bathome.net./) | Powered by Discuz! 7.2 |