输出目录结构
- @echo off
- set workingDir=%~dp0
- set file=allbook.txt
- if exist %file% del %file%
- setlocal enabledelayedexpansion
- for /r %workingDir% %%i in (. *) do (
- set "bookname=%%i"
- set "bookNameFile=%%~nxi"
-
- if "!bookname:\.=!" equ "!bookname!" (
- rem file
- echo !bookNameFile!>>%file%
- ) else (
- rem dir
- echo= >>%file%
- echo !bookname!>>%file%
- )
-
- )
- setlocal disabledelayedexpansion
本帖以下内容被隐藏保护;需要你回复后,才能看到! 游客,如果您要查看本帖隐藏内容请 回复
|