上面那个是独立合并,这个是全部合并- @echo off
- setlocal enabledelayedexpansion
- for %%a in (*.txt) do set "fn=!fn! "%%a""
- call :sc!fn!
- exit /b
- :sc
- set n=10000
- for /f "delims=" %%a in (%~1) do (
- set /a n+=1
- for %%b in (!n!) do set "#%%b=!#%%b! %%a"
- )
- if not "%~2"=="" (
- shift /1
- ) else (
- (for /f "tokens=1* delims== " %%c in ('set #') do echo,%%d)>all_.txt
- goto :eof
- )
- goto sc
复制代码
|