• Login
Community
  • Login

How do I delete only the second line from multiple text files?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
2 Posts 2 Posters 185 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 한
    한승호
    last edited by Dec 16, 2023, 2:13 PM

    Hello. I have several text files like the one below, and I only want to delete the content of the second line.
    What should I do?
    I tried to find a solution, but none of the answers worked for me.
    Please help me…

    2310.txt
    1-2023-10-01
    2-2023-10-02
    3-2023-10-03
    4-2023-10-04
    5-2023-10-05

    2311.txt
    1-2023-11-01
    2-2023-11-02
    3-2023-11-03
    4-2023-11-04
    5-2023-11-05

    A 1 Reply Last reply Dec 16, 2023, 2:50 PM Reply Quote 0
    • A
      Alan Kilborn @한승호
      last edited by Dec 16, 2023, 2:50 PM

      @한승호

      Find: (?-s)\A.*\R\K.*\R
      Replace: nothing
      Search mode: Regular expression
      Action: Replace-in-Files

      1 Reply Last reply Reply Quote 4
      2 out of 2
      • First post
        2/2
        Last post
      The Community of users of the Notepad++ text editor.
      Powered by NodeBB | Contributors