windows批处理命令(1)——右键清理空文件夹 -
清理空文件夹.bat
@echo off
echo 正在删除当前目录及子目录中所有的空文件夹,请稍后......
echo -------------------------------------------------------------
cd. > listnull.txt
for /f "delims=" %%a in ('dir /ad /b /s') do (
dir /b "%%a" | findstr .>nul || echo %%a >> listnull.txt
)
set /a sum=0
for /f "tokens=*" %%i in (listnull.txt) do (
rd /q "%%i"
echo 成功删除空目录:%%i
set /a sum=sum+1
)
del listnull.txt /f /q
echo -------------------------------------------------------------
echo 共成功删除%cd%目录及其子目录下%sum%个空文件夹
pause
adb截图.bat
cd /
D:
md pic
SET str="%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%"
adb shell screencap -p /sdcard/%str%.png
adb pull /sdcard/%str%.png H:\Program\02cmd\pic
adb shell rm /sdcard/*.png
start H:\Program\02cmd\pic
exit