dml1 当前离线
列兵
评分人数
pcl_test 当前离线
荣誉版主
@echo off setlocal enabledelayedexpansion set "fdir=2想要的" if not exist "%fdir%" md "%fdir%" cd /d "1原来的\" for /f "delims=" %%a in ('dir /b *.txt') do ( set n=1 for /f "tokens=1* delims=:" %%b in ('findstr /n .* "%%a"') do ( if !n! ==1 >"%~dp0%fdir%\%%a" echo %%c if !n! gtr 7 if !n! lss 13 >>"%~dp0%fdir%\%%a" echo %%c set /a n+=1 ) ) pause复制代码
TOP
DAIC 当前离线
中将
@echo off setlocal enabledelayedexpansion for /f "delims=" %%a in ('dir /b /a-d "1原来的\*.txt"') do ( set n=1 (for /f "tokens=1* delims=:" %%b in ('findstr /n .* "%%a"') do ( if !n! equ 1 ( echo,%%c ) else if !n! geq 8 ( if !n! leq 12 ( echo,%%c ) ) set /a n+=1 ))>"2想要的\%%a" ) pause复制代码
@echo off setlocal enabledelayedexpansion for /f "delims=" %%a in ('dir /b *.txt') do ( set n=1 for /f "tokens=1* delims=:" %%b in ('findstr /n .* "%%a"') do ( if !n! ==1 >$ echo %%c if !n! gtr 7 if !n! lss 13 >>$ echo %%c set /a n+=1 ) move $ "%%a" ) pause复制代码
@echo off setlocal enabledelayedexpansion cd /d "C:\新建文件夹 (6)\新建文件夹 (2)\1原来的" set "fdir=C:\新建文件夹 (6)\新建文件夹 (2)\2想要的" if not exist "%fdir%" md "%fdir%" for /f "delims=" %%a in ('dir /b *.txt') do ( set n=1 for /f "tokens=1* delims=:" %%b in ('findstr /n .* "%%a"') do ( if !n! ==1 >"%fdir%\new_%%a" echo %%c if !n! gtr 7 if !n! lss 13 >>"%fdir%\new_%%a" echo %%c set /a n+=1 ) ) pause复制代码