Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

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

    Help wanted · · · – – – · · ·
    multiple files delete text save on exit
    3
    5
    138
    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.
    • Mosaad Aljobair
      Mosaad Aljobair last edited by

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

      thank you.

      PeterJones 1 Reply Last reply Reply Quote 0
      • PeterJones
        PeterJones @Mosaad Aljobair last edited by PeterJones

        @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

        Mosaad Aljobair 1 Reply Last reply Reply Quote 2
        • Mosaad Aljobair
          Mosaad Aljobair @PeterJones last edited by

          @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
          • PeterJones
            PeterJones last edited by PeterJones

            @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.

            Alan Kilborn 1 Reply Last reply Reply Quote 4
            • Alan Kilborn
              Alan Kilborn @PeterJones last edited by

              @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
              • First post
                Last post
              Copyright © 2014 NodeBB Forums | Contributors