回复 12# hlyahs
先把你已分离出来的文件 放到任意一个文件里,再把该文件夹拖到批处理上。- @echo off & setlocal EnableDelayedExpansion
-
- md new>nul 2>nul
- for /f "delims=" %%a in ('dir/a-d/b "%~1\*.txt"') do (
- set /a n=0
- for /f "delims=" %%i in ('type "%~1\%%a"') do (
- set /a n+=1
- if !n! leq 1 (
- set "str=%%i"
- set "str=!str: =\!"
- for /f "delims=" %%m in ("!str!\..") do if /i "%%~nxm" == "0" move /y "%~1\%%a" "new\"
- )
- )
- )
- pause & exit
复制代码
|