@echo off
set "a=%cd%"
cd..
set "b=%cd%"
call set "c=%%a:%b%=%%"
set "c=%c:\=%"
cd %c%
for /f "delims=" %%a in ('dir/a/b wj*.txt') do type "%%a">>%c%.txt
并排合并.bat 出错
@echo off&setlocal enabledelayedexpansion
set 文件数=100
for /l %%a in (1,1,%文件数%) do (
for /f "delims=" %%i in (%%a.txt) do (
set /a n+=1
for %%a in (!n!) do set "#%%a=!#%%a! %%i"
)
set /a m=n,n=0
)
(for /l %%a in (1,1,%m%) do echo,!#%%a:~1!)>wj.txt
删除空格.bat
@echo off
for /f "delims=" %%x in ('dir/b/a-d *.txt')do (echo %%x&set/a n+=1
(for /f "usebackq delims=" %%i in ("%%x")do for %%j in (%%i)do echo.%%j)>temp.yky
move temp.yky "%%x")
echo %n% 个文件处理完毕
exit