How to delete carriage return using batch file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ddtpmyra
    Contributor
    • Jun 2008
    • 333

    #1

    How to delete carriage return using batch file

    I found this script and it's working perfectly fine it just that it can only process less file 8KB and I have bigger than that 49kb. Anybody who can help me to resolve this problem?

    sample data

    apple banana mango
    apple banana mango
    apple banana mango

    output data desired
    apple banana mango apple banana mango apple banana mango

    Code:
    @echo off > newfile
    setLocal EnableDelayedExpansion
    for /f "tokens=* delims= " %%a in (current.txt) do (
    set s=!s!%%a
    )
    echo !s! >> newfile.dat
    
    
    pause
Working...