Announcement

Collapse
No announcement yet.

Batch script to edit txt

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Batch script to edit txt

    Hi,
    We have a txt file that is getting populated by a database dump, but there are CR and LF breaks, that we don't want. Basically, I am trying to edit C:\app.txt, remove all CRs and LFs, and then add [email protected]# in front of "_TEXT_", and add a CR in front of "[email protected]#_TEXT_". This way, I only have CR in the places I want them, not all over the place.
    I have tried using change.exe by Bruce Gunthrie, which worked well in a 32 bit environment, but doesn't work on a 64bit PC.
    Any help would be greatly appreciated.
    Thanks
    Luke

    eg.
    _TEXT_ data data1
    data2 data3 data4
    _TEXT_ data data1
    data2 data3 data4

    Should read:
    _TEXT_ data data1 data2 data3 data4
    _TEXT_ data data1 data2 data3 data4

  • #2
    Re: Batch script to edit txt

    You need a program which works on 64bit PC?
    Last edited by Husborn; 26th July 2012, 12:57.

    Comment


    • #3
      Re: Batch script to edit txt

      Hi Husborn,

      Either a 64bit text editor that can be run as a batch file, or some kind of script. Unfortunately my skills in this area are a little lacking.

      Thanks
      Luke

      Comment


      • #4
        Re: Batch script to edit txt

        Thanks Husborn,
        Managed to get this sorted with 2 powershell scripts.

        Thanks
        Luke

        Comment

        Working...
        X