本帖最后由 zaqmlp 于 2020-1-8 17:33 编辑
- @echo off
- mode con lines=3000
- set info=互助互利,支付宝扫码头像,感谢打赏
- rem 有问题,可加QQ956535081及时沟通
- title %info%
- cd /d "%~dp0"
- set "folder=pages"
- for /f "delims=" %%a in ('dir /ad/b') do (
- echo;--------------"%%a"------------
- if not exist "%%a\%folder%\" (
- md "%%a\#_tmp\"
- for /f "delims=" %%b in ('dir /b "%%a\" 2^>nul') do (
- if /i "%%~nxb" neq "#_tmp" (
- move "%%a\%%~nxb" "%%a\#_tmp\"
- )
- )
- ren "%%a\#_tmp" "%folder%"
- ) else (
- for /f "delims=" %%b in ('dir /b "%%a\" 2^>nul') do (
- if /i "%%~nxb" neq "%folder%" (
- move /y "%%a\%%~nxb" "%%a\%folder%\"
- )
- )
- )
- echo;
- )
- :end
- echo;%info%
- pause
- exit
复制代码
|