Add content of text files into another .txt

March 1, 2010 at 01:23:38
Specs: Windows XP, Core2Duo/2GB
Hi everybody,

I have some .txt files that store comma separated data.
I need to export (load) their contents in another .txt file (loaded_records.txt)

Can anyone help?

thnx in advance,
Pupli


See More: Add content of text files into another .txt

Report •


#1
March 1, 2010 at 03:17:59
@echo off > loaded_records.txt & setLocal enableDELAYedeXpansion

for /f "tokens=* delims= " %%a in ('dir/b/a-d *.csv') do (
type %%a >> loaded_records.txt
)


=====================================
Helping others achieve escape felicity

M2


Report •

#2
March 1, 2010 at 03:55:05
nice

thnx


Report •

#3
March 1, 2010 at 14:39:34
I was trying this, and it seems to work fine ... with one limitation: if the files beholded, match the name of the end-result, you must work-around it.

Example (if that not being a problem)

type *.csv > loaded_records.txt

But, if being a problem:

type *.txt > loaded_records.tmp
rename loaded_records.tmp loaded_records.txt


Report •
Related Solutions


Ask Question