1.

Solve : reading txt file line by line?

Answer»

hey all,

I'm trying to write a batch FILE that will read a txt file line by line and then write all the lines to a new txt on the same line.

Example;

original txt file;
Code: [Select]Some text is written here
some more here

and more here

New txt file
Code: [Select]some text is written here some more here and more here

Basically, I have a txt file with data in that I want to import to a access database. This text file will have different content each time it's accessed and "might" have txt over multiable lines.

I'm getting error's while trying to import this SORT of data VIA a VBA SCRIPT. (Thanks to Sidewinder for that one)

Anyone got any ideas??

cheers in advance@echo off
set c=0
for /f "tokens=1 delims=*" %%a in (file.txt) do (
call set /a c=%%c%%+1
call set c.%%c%%=%%a
)
echo %c.1% %c.2% %c.3% %c.4% %c.5% %c.6% %c.7% %c.8% %c.9%
PERFECT!!!!

cheers mate!



Discussion

No Comment Found