Page 1 of 1
Merge all txt file in seprate file
Posted: 10 Jul 2012 11:06
by DingDang
Hi,
I have multiple txt files in folder, i just want to merge all txt files in seprate file in same folder.
pls guide.
Re: Merge all txt file in seprate file
Posted: 10 Jul 2012 11:21
by Squashman
copy /A *.txt Newfile.tmp
Re: Merge all txt file in seprate file
Posted: 10 Jul 2012 11:27
by abc0502
@echo off
cls
For /F %%a in ('dir /B /A:-D *.txt') do (
for /f "tokens=*" %%b in (%%a) do echo %%b >>Final-File.txt
)
This code i think foxidrive posted before , i'm not sure exactly, but tested and working
Note:
forgot to say put the batch in the same folder with the files
Re: Merge all txt file in seprate file
Posted: 10 Jul 2012 11:59
by !k
Code: Select all
type *.txt >> _all.tmp
move _all.tmp _all.txt