常用Windows批处理命令

1.清除制定目录下的空文件夹

@echo off
for /f "tokens=*" %%a in ('dir /b /ad /s C:\test^|sort /r') do rd "%%a" /q 2>nul

2.批量获取指定目录下的文件名  

dir E:\test /b > E:\test\asd.txt

 

未完待续...

 

posted @ 2018-12-12 20:41  清风与归_G  阅读(126)  评论(0编辑  收藏  举报