Think before you speak, read before you think.

windows显示当前目录下文件和文件夹的绝对路径

执行下面脚本

@echo on
@echo > txt.txt
@echo ========输出当前目录下的文件夹 >> txt.txt
@for /d %%i in (*.*) do @echo %~dp0%%%i>> txt.txt

@echo ========输出当前目录下的文件 >> txt.txt
@for %%c in (*.*) do @echo %~dp0%%%c>> txt.txt
@pause;

会在txt.txt中出现

========输出当前目录下的文件夹
F:\剧集\法证先锋III
F:\剧集\法证先锋粤语大结局抢先版
F:\剧集\美剧
========输出当前目录下的文件
F:\剧集\txt.txt
F:\剧集\xx.bat


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *