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
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
@echo off
for /d %%a in ("C:\陈青云\*") do for /f "delims=" %%b in ('dir /s/b/a-d/on "%%a\*.txt"') do echo %%~na.txt %%b
pauseAlso state your operating system version@echo off&setlocal enabledelayedexpansion
for /d %%a in ("C:\Chen Qingyun\*") do (
for /f "delims=" %%b in ('dir /s/b/on "%%a\*.txt"') do (
set b=%%~nb
if /i "!b:~0,5!"=="mydoc" type "%%b">>"C:\Chen Qingyun\%%~na.txt"
))Originally posted by Hanyeguxing at 2011-1-7 23:17:
Click the below to copy directly
@echo off&setlocal enabledelayedexpansion
for /d %%a in ("C:\陈青云\*") do (
for /f "delims=" ...