中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-09-23 14:38
47,812 topics / 349,917 posts / today 0 new / 48,273 members
DOS批处理 & 脚本技术(批处理室) » How to batch merge files in sequence?
Printable Version  1,894 / 9
Floor1 dddyjq1 Posted 2011-01-07 00:08
初级用户 Posts 108 Credits 175
How to batch merge files in order? It is required to merge all.TXT files in the directory C:\Chen Qingyun\01 Bing Shusheng\ in order mydoc001.TXT mydoc002.TXT...... into 01 Bing Shusheng.TXT and place it in C:\Chen Qingyun, thank you in advance
Floor2 Hanyeguxing Posted 2011-01-07 09:16
银牌会员 Posts 897 Credits 1,039 From 在地狱中仰望天堂
```@echo off&setlocal enabledelayedexpansion
for /d %%a in ("C:\陈青云\*") do for /f "delims=" %%b in ('dir /s/b/on "%%a\mydoc*.txt"') do type "%%b">>"C:\陈青云\%%~na.txt"


[ Last edited by Hanyeguxing on 2011-1-7 at 23:23 ]```
Floor3 dddyjq1 Posted 2011-01-07 22:48
初级用户 Posts 108 Credits 175
Thanks, but there is no response after running, and there is nothing. Please help me take a look again
Floor4 Hanyeguxing Posted 2011-01-07 23:06
银牌会员 Posts 897 Credits 1,039 From 在地狱中仰望天堂
Use this test, paste the display result:
Also state your operating system version
Floor5 dddyjq1 Posted 2011-01-07 23:14
初级用户 Posts 108 Credits 175
XP system, when running, can display a list of files in a column. I don't know how to post it up, thanks in advance.

[ Last edited by dddyjq1 on 2011-1-7 at 23:19 ]
Floor6 Hanyeguxing Posted 2011-01-07 23:17
银牌会员 Posts 897 Credits 1,039 From 在地狱中仰望天堂
Click the below to directly copy

[ Last edited by Hanyeguxing on 2011-1-7 at 23:20 ]
Floor7 dddyjq1 Posted 2011-01-07 23:21
初级用户 Posts 108 Credits 175
Thanks, but no merged file was generated. Please take a look again.
Floor8 Hanyeguxing Posted 2011-01-07 23:25
银牌会员 Posts 897 Credits 1,039 From 在地狱中仰望天堂
Refresh the web page and then re - copy and run
Floor9 dddyjq1 Posted 2011-01-07 23:27
初级用户 Posts 108 Credits 175
Yes, that's it. It's really great. Thank you very much
Floor10 glodboy Posted 2011-01-08 10:56
新手上路 Posts 11 Credits 10
Originally posted by Hanyeguxing at 2011-1-7 23:17:
Click the below to copy directly
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023