0

I have few hundreds of file and in all files the firstline starts with "tank export for xxxx...".I want to remove that line from all the files in the folder using notepad++. I tried find in files and replace option but it is not removing the line. Can anyone point me how can I achieve this using notepad++?

Ratha
  • 9,434
  • 17
  • 85
  • 163
  • Seems like opening all hundred of the files in NP++ would be terribly slow compared to writing a PS command to do the job. Are you open to non-NP++ solutions? See [this](https://stackoverflow.com/questions/2074271/remove-top-line-of-text-file-with-powershell) for example. – ggorlen Oct 08 '19 at 02:16
  • @ggorlen can we do Mark(bookmark option) for the files in a folder at once? – Ratha Oct 08 '19 at 02:19
  • Not sure what that is, sorry. Is that a NP++ thing? I also don't know PS, really. Does the link above not do the job though? Seems pretty straightforward to me. The find in files option is only for opened files, AFAIK. – ggorlen Oct 08 '19 at 02:20

1 Answers1

1

Don't forget to save you directory before processing!

  • Ctrl+Shift+F
  • Find what: ^tank export for.+$
  • Replace with: LEAVE EMPTY
  • Filters: *.txt
  • Directory: Path\where\your\files\are
  • CHECK Match case
  • CHECK Regular expression
  • UNCHECK . matches newline
  • Replace in Files

Screen capture:

enter image description here

Community
  • 1
  • 1
Toto
  • 89,455
  • 62
  • 89
  • 125