#1
  1. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    696
    Rep Power
    95

    Removing the return from end of line


    I have a file that I need to remove the return character from the end of each line. There must be a way to do it with a script.

    Thanks,
    Evan
  2. #2
  3. Moderator Emeritus
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2002
    Location
    Austin, TX
    Posts
    7,186
    Rep Power
    2265
    You could use Textpad, and create a Macro to do this... just one way.
    DrGroove, Devshed Moderator | New to Devshed? Read the User Guide | Connect with me on LinkedIn
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Location
    Bulgaria
    Posts
    3
    Rep Power
    0

    I have a small tool for this


    I have a small tool written in AutoIt.
    It reads your file and removes enter, then writes in another file.
    I have included the compiled .exe in today's promotions on my site.
    You can download it from there or use the code below and compile by yourself:

    $n = InputBox("filename","enter the filename - must be in SAME folder with script!",'')
    $f = FileOpen($n, 0)
    $f1 = FileOpen($n & '-result.txt', 2)
    While 1
    $l = FileReadLine($f)
    If @error = -1 Then ExitLoop
    $l1 = StringReplace($l, @CRLF, '')
    FileWrite($f1, $l1)
    WEnd
    FileClose($f)
    FileClose($f1)
    MsgBox(0, 'Ready!', "Your new file is " & $n & '-result.txt')

IMN logo majestic logo threadwatch logo seochat tools logo