I am trying to remove carriage return from .tsv file using batch file. This is how my .tsv file looks, the first line is a column line
* **[CR] and [LF] shown in these lines are manually added to get an idea
Class Name & Address Item lbs Value Pickup/Drop off Date: 23 Sep[CR][LF]
Class1 Ben Coha[CR]
2305 E LA st[CR]
VISIA, PA[CR]
932112-4422 Health and beauty product / cologne body wear for men 0.13 19[CR][LF]
Class2 mich marce[CR]
255 rid court[CR]
prince frick, PA[CR]
20442 health and beauty product / cologne body wear for women 1.5 47
I want this file as below [I used notepad to remove('replace' by nothing) occurrences of [CR] only]
Class Name & Address Item lbs Value Pickup/Drop off Date: 23 Sep[LF]
Class1 Ben Coha 2305 E LA st VISIA, PA 932112-4422 Health and beauty product / cologne body wear for men 0.13 19[LF]
Class2 mic marce 255 rid court prince frick, PA 20442 health and beauty product / cologne body wear for women 1.5 47
I tried following batch file. file is being put in one single line. It removes both carriage return and line feed.
@echo off
SetLocal DisableDelayedExpansion
for /f "delims=" %%a in (myFile.tsv) do (
echo/|set /p ="%%a%"
)>>newMyFile.tsv
The result looks like..
Class Name & Address Item lbs Value Pickup/Drop off Date: 23 SepClass1 Ben Coha 2305 E LA st VISIA, PA 932112-4422 Health and beauty product / cologne body wear for men 0.13 19 Class2 mic marce 255 rid court prince frick, PA 20442 health and beauty product / cologne body wear for women 1.5 47
I want to modify the .bat file so that it only removes \r instead of removing both \r\n
Update: Somehow I am able to add images, this will give clearer idea.
Similar .tsv file
want it to be like this