回复 1# tigerlxh
请参考Q-04把bat文件保存为ANSI编码:
https://mp.weixin.qq.com/s/6lbb97qUOs1sTyKJfN0ZEQ- @echo off
- cd /d "%~dp0"
- setlocal enabledelayedexpansion
- set n=0
- for /f "delims=" %%i in ('dir /b /a-d ^| findstr /v /x "%~nx0"') do (
- set /a n+=1
- set /a m=n%%2
- if !m! equ 1 (
- set "folder=%%~ni"
- md "!folder!"
- )
- move "%%i" "!folder!"
- )
复制代码
|