Shalver
asked on
Carriage Return in Batch File
I need to create a batch file that gets rid of the carriage return. The delimiter looks like a square [].
I attached what the file looks like and highlighted what I see the carriage return as and also another file what the expected output is ..
Any ideas how this can be accomplished
carriage-return.PNG
carriage-return---how-it-should-look.PNG
I attached what the file looks like and highlighted what I see the carriage return as and also another file what the expected output is ..
Any ideas how this can be accomplished
carriage-return.PNG
carriage-return---how-it-should-look.PNG
ASKER
I started something like this but it definitely is not correct !!!
@echo off
setlocal enableextensions disabledelayedexpansion
set "first=1"
<nul (
for /f "usebackq delims=" %%a in ("Carfinance2.txt") do (
if defined first (set /p ".=%%a" & set "first=") else (set /p ".=,%%a")
)
) >"output.txt"
@echo off
setlocal enableextensions disabledelayedexpansion
set "first=1"
<nul (
for /f "usebackq delims=" %%a in ("Carfinance2.txt") do (
if defined first (set /p ".=%%a" & set "first=") else (set /p ".=,%%a")
)
) >"output.txt"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This solution worked ! Thank you very much
Welcome.
type filein.txt > fileout.txt
or
more filein.txt > fileout.txt
~bp