test.bat,拖动图片到bat图标上
也可以做成右键菜单,参考以前的贴子- @echo off & cd /d "%~dp0"
- if not exist "%~1" ( echo 文件路径无效! & pause&exit )
- cd /d "%~dp1"
- REM 文件夹名称
- set "dir_name=专辑图片与介绍"
- REM 移动拓展名
- set "ext_list=*.doc *.pdf *.txt *.jpg *.png"
- dir /b /ad | findstr /vbe /C:"%dir_name%" >nul 2>nul && ( echo 含有其它文件夹! &pause&exit )
- mkdir "%dir_name%" >nul 2>nul
- REM 移动文件
- for %%i in (%ext_list%) do move /y "%%i" "%dir_name%\"
- pause&exit
复制代码
|