Remove next line from a .txt file

March 4, 2009 at 10:34:37
Specs: Windows XP
does any body know how to remove
"new line" using a .bat file

initial file1.txt

dog
cat
mouse
horse

final file2.txt

dogcatmousehorse


See More: Remove next line from a .txt file

Report •


#1
March 4, 2009 at 14:25:12
It depends on the file's size, i.e. if your file is of limited size as you posted and anyway no more than, say, 1024 bytes or so, then

@echo off & setlocal EnableDelayedExpansion
set line=
for /F "delims=" %%j in (file1.txt) do set line=!line!%%j
echo.%line%> file2.txt
:: End_Of_Batch


Report •
Related Solutions


Ask Question