回复 3# hnfeng
显示不太标准- @echo off
- REM 存为ANSI编码
- set "folder=c:\test"
- set /a num=0, max=5
- echo;%folder%
- call :loop "%folder%"
- pause&exit
- :loop
- pushd %1
- if %num% lss %max% (
- for /d %%d in (*) do (
- if %num% geq 1 (
- set /p=│ <nul
- )else set /p=├─<nul
- for /l %%i in (1,1,%num%) do (
- if %%i neq %num% (
- set /p=│ <nul
- ) else set /p=└─<nul
- )
- echo;%%d
- set /a num+=1
- call :loop "%%d"
- set /a num-=1
- )
- )
- popd
- exit/b
复制代码
|