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 775 Views 2 Watching
    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 AljobairM Offline
      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.

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP Offline
        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 AljobairM 1 Reply Last reply Reply Quote 2
        • Mosaad AljobairM Offline
          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
          • PeterJonesP Offline
            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 KilbornA 1 Reply Last reply Reply Quote 4
            • Alan KilbornA Offline
              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

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors