Reduce file size

Reduce file size

2
NewbieNewbie
2

    May 16, 2006#1

    I have numerous files that contain over 4 million lines of information. I want to skip to every tenth line and delete the entire line, thusly reducing the amount of information in a particular file. Unfortunately, I have no programming skills and wonder if there is some code that I could use.

    Any help will be greatly appreciated.

    Thanks,

    6,686585
    Grand MasterGrand Master
    6,686585

      May 16, 2006#2

      The following single UltraEdit style Regular Expression Replace All will delete line 10, 20, 30, 40, ...

      Find What: %^(*^p*^p*^p*^p*^p*^p*^p*^p*^p^)*^p
      Replace With: ^1

      In Unix style the same regex is:

      Find What: ^(.*\p.*\p.*\p.*\p.*\p.*\p.*\p.*\p.*\p).*\p
      Replace With: \1

      But you want a macro, here is it. Quite simple, isn't it.

      InsertMode
      ColumnModeOff
      HexOff
      Bottom
      IfColNum 1
      Else
      "
      "
      EndIf
      Top
      Loop
      Key DOWN ARROW
      Key DOWN ARROW
      Key DOWN ARROW
      Key DOWN ARROW
      Key DOWN ARROW
      Key DOWN ARROW
      Key DOWN ARROW
      Key DOWN ARROW
      Key DOWN ARROW
      IfEof
      ExitLoop
      EndIf
      DeleteLine
      EndLoop
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        May 16, 2006#3

        Excellent!!!! Thank you