Deleting first x lines of some files

Deleting first x lines of some files

4
NewbieNewbie
4

    Oct 04, 2005#1

    Hello,
    I'm new to UltraEdit-32 and I have a problem with it.
    I'll try to explain in the best possible way.

    I have several text files (more than 4000); all these files have the same structure. I need to delete the first 12 lines of each of the 4000 files, and I would like to do this in an automatic way, but I don't know exactly how to do it...

    I know that probably this is quite simple as a problem, but being new to this software I'm still learning to use it.

    Can anyone help me?

    Many thanks
    Bye

    Carlo Tursi

    6,675585
    Grand MasterGrand Master
    6,675585

      Oct 05, 2005#2

      If the 12 lines of all files are 100% identical and these 12 lines only exist once in all files, it's easy. Open one of these files, select the 12 lines and and open Search - Replace In Files. The selected text is automatically inserted in the find field. Now enter the directory and the file spezification search criteria and run the replace.
      But first make a copy of the 4000 files, if you don't have experience.

      If the 12 lines are not identical, give us some examples here in the forum inside . Use post preview button. Maybe we then can find a regular expression replace, which can work.
      Best regards from an UC/UE/UES for Windows user from Austria

      4
      NewbieNewbie
      4

        Oct 05, 2005#3

        the 12 lines are not actually identical.
        They are as follows:

        Code: Select all

        NOME FILE                 : A1A1 
        NUMERO DI CAMPIONI TOTALI :     6000
        FREQUENZA DI CAMPIONAMENTO:      600
        TEMPO DI ACQUISIZIONE     :     10.0
        RANGE DI ACQUISIZIONE     :     10.0
        CANALE DI INIZIO          :        1
        CANALE DI TRIGGER         :        1
        RANGE DI TRIGGER   %      :     20.0
        RANGE DI TRIGGER IN VOLT  :      2.0
        PRE/POST TRIGGER          :     10.0
        NUMERO DI CANALI          :        6
        
        What varies is the first line (A1A1 assumes different values in all 4000 files).

        These lines are repeated once in each file.

        Hope this helps.

        Thanks
        Bye
        Carlo

        6,675585
        Grand MasterGrand Master
        6,675585

          Oct 05, 2005#4

          Try this "long" REGULAR EXPRESSION search string in the Replace In Files dialog. Replace it with nothing. Make sure Advanced - Configuration - Find - Unix style Regular Expressions is not checked, because this is a regular expression in UltraEdit style.

          NOME FILE :*^pNUMERO DI CAMPIONI TOTALI :*^pFREQUENZA DI CAMPIONAMENTO:*^pTEMPO DI ACQUISIZIONE :*^pRANGE DI ACQUISIZIONE :*^pCANALE DI INIZIO :*^pCANALE DI TRIGGER :*^pRANGE DI TRIGGER % :*^pRANGE DI TRIGGER IN VOLT :*^pPRE/POST TRIGGER :*^pNUMERO DI CANALI :*^p
          Best regards from an UC/UE/UES for Windows user from Austria

          4
          NewbieNewbie
          4

            Oct 05, 2005#5

            it worked fine.

            Thanks a lot for the precious support.

            Bye!

            Carlo