• Login
Community
  • Login

How to open multiple files then delete all lines inside and save all files?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
multiple filesdelete textsave on exit
5 Posts 3 Posters 363 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.
  • M
    Mosaad Aljobair
    last edited by Sep 28, 2019, 12:46 AM

    hello,
    i have files i like to delete all lines inside and save files to be 0 bytes.

    thank you.

    P 1 Reply Last reply Sep 28, 2019, 2:11 AM Reply Quote 0
    • P
      PeterJones @Mosaad Aljobair
      last edited by PeterJones Sep 28, 2019, 2:13 AM Sep 28, 2019, 2:11 AM

      @Mosaad-Aljobair said:

      hello,
      i have files i like to delete all lines inside and save files to be 0 bytes.

      thank you.

      Three steps per file:

      • Ctrl-A
      • DEL
      • Ctrl-S

      edit: 5 steps if you count opening the file at the start, and closing the file at the end

      M 1 Reply Last reply Oct 1, 2019, 8:45 PM Reply Quote 2
      • M
        Mosaad Aljobair @PeterJones
        last edited by Oct 1, 2019, 8:45 PM

        @PeterJones thank you,
        I mean open all files like 10 files in one time, then delete all lines inside each file then save all, exit

        1 Reply Last reply Reply Quote 0
        • P
          PeterJones
          last edited by PeterJones Oct 1, 2019, 9:07 PM Oct 1, 2019, 9:06 PM

          @Mosaad-Aljobair said in How to open multiple files then delete all lines inside and save all files?:

          I mean open all files like 10 files in one time, then delete all lines inside each file then save all, exit

          I mean do my procedure 10 times. Or set up a script of some sort to do it for you. (Notepad++ has multiple available scripting plugins which you could learn, including PythonScript, and LuaScript.)

          Honestly, your problem is most easily solved at the command line, not in Notepad++. I could do it in a one-line at the cmd.exe prompt. The following proves it, if you can find the menu in Notepad++ that will decode this base64 text.

          c3BlY2ZpY2FsbHksIGZyb20gdGhlIGNtZC5leGUgcHJvbXB0OiBmb3IgJWYgaW4g
          KCAqICkgRE8gQCggQGVjaG8gJWYgJiBAZGVsICVmICYgQHR5cGUgTlVMID4gJWYg
          KQ0KDQoNCiAgICBDOlwuLi5cVGVtcFx0PmRpcg0KICAgICBEaXJlY3Rvcnkgb2Yg
          QzpcLi4uXFRlbXBcdA0KDQogICAgMTAvMDEvMjAxOSAgMDI6MDIgUE0gICAgPERJ
          Uj4gICAgICAgICAgLg0KICAgIDEwLzAxLzIwMTkgIDAyOjAyIFBNICAgIDxESVI+
          ICAgICAgICAgIC4uDQogICAgMTAvMDEvMjAxOSAgMDI6MDEgUE0gICAgICAgICAg
          ICAgICAgIDcgYQ0KICAgIDEwLzAxLzIwMTkgIDAyOjAxIFBNICAgICAgICAgICAg
          ICAgICA3IGINCiAgICAxMC8wMS8yMDE5ICAwMjowMSBQTSAgICAgICAgICAgICAg
          ICAgNyBjDQogICAgICAgICAgICAgICAgICAgMyBGaWxlKHMpICAgICAgICAgICAg
          IDIxIGJ5dGVzDQoNCiAgICBDOlwuLi5cVGVtcFx0PmZvciAlZiBpbiAoICogKSBE
          TyBAKCBAZWNobyAlZiAmIEBkZWwgJWYgJiBAdHlwZSBOVUwgPiAlZiApDQogICAg
          YQ0KICAgIGINCiAgICBjDQoNCiAgICBDOlwuLi5cVGVtcFx0PmRpcg0KICAgICBE
          aXJlY3Rvcnkgb2YgQzpcLi4uXFRlbXBcdA0KDQogICAgMTAvMDEvMjAxOSAgMDI6
          MDIgUE0gICAgPERJUj4gICAgICAgICAgLg0KICAgIDEwLzAxLzIwMTkgIDAyOjAy
          IFBNICAgIDxESVI+ICAgICAgICAgIC4uDQogICAgMTAvMDEvMjAxOSAgMDI6MDIg
          UE0gICAgICAgICAgICAgICAgIDAgYQ0KICAgIDEwLzAxLzIwMTkgIDAyOjAyIFBN
          ICAgICAgICAgICAgICAgICAwIGINCiAgICAxMC8wMS8yMDE5ICAwMjowMiBQTSAg
          ICAgICAgICAgICAgICAgMCBjDQogICAgICAgICAgICAgICAgICAgMyBGaWxlKHMp
          ICAgICAgICAgICAgICAwIGJ5dGVzDQoNCiAgICBDOlwuLi5cVGVtcFx0Pg0K
          

          If you want help, it’s best to show effort, and not just demand changes from those of us who are volunteering to help you.

          A 1 Reply Last reply Oct 1, 2019, 9:13 PM Reply Quote 4
          • A
            Alan Kilborn @PeterJones
            last edited by Oct 1, 2019, 9:13 PM

            @PeterJones

            Heheh…Peter holds people hostage to some decoding effort…hehehe. Wish I’d thought of that technique. It’s got snarky me written all over it. LOL

            In other words, Nice one Peter!

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