in c:\mydir\ have 87 .txt files.
i need via batch code, to append all lines from each .txt files in one big .txt file...
How to?
join/append txt file from c:\mydir\
Moderator: DosItHelp
-
- Posts: 246
- Joined: 04 Mar 2014 11:14
- Location: germany
Re: join/append txt file from c:\mydir\
Hello,
did you mean so? at command promt:
Phil
did you mean so? at command promt:
Code: Select all
@(for /f "delims=" %i in ('dir /b C:\mydir\*.txt') do @for /f usebackQdelims^=^ tokens^=*^eol^= %j in ("%i") do @ <nul set /p "=%j") >C:\mydir\oneBig.txt.log
Phil
Re: join/append txt file from c:\mydir\
sal21 wrote:in c:\mydir\ have 87 .txt files.
i need via batch code, to append all lines from each .txt files in one big .txt file...
How to?
If they are in the correct order you can use this:
Code: Select all
copy *.txt new_file.txt
(this new_file.txt will have an EOF character at the end of file)
or
Code: Select all
copy /b *.txt a.a new_file.txt
(this new_file.txt will not have an EOF character at the end of file)
Hope this helps.
Saso