Community
    • Login

    How to insert Path+Filename in an already opened doc

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 4 Posters 576 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.
    • Elodie CEMOIE
      Elodie CEMOI
      last edited by

      Hi,
      I use Npp 7.7.1 and I would like to know how to insert the Path/Filename of the already opened document at (for ex) the beginning of the document ??
      Of course I will insert this after the “comment” marks “//”.
      This is for helping me to find the location of a document when opened in Npp.
      Thank you

      1 Reply Last reply Reply Quote 0
      • rinku singhR
        rinku singh
        last edited by rinku singh

        @Elodie-CEMOI said in How to insert Path+Filename in an already opened doc:

        Path/Filename of the already opened document

        Use notepad++ demo plugin for current document

        1 Reply Last reply Reply Quote 0
        • Alan KilbornA
          Alan Kilborn
          last edited by

          Well, it is certainly very easy to right-click the tab of the document, choose the option to copy the complete pathname to the clipboard, and then do a paste at your desired location.

          I certainly wouldn’t bother with a plugin for that.

          1 Reply Last reply Reply Quote 1
          • guy038G
            guy038
            last edited by guy038

            Hello, @elodie-cemoi and All,

            Don’t you remember posting for the same question, about one year ago ?! Refer to Scott’s posts, below :

            https://community.notepad-plus-plus.org/post/34315


            Now, here is a macro, which needs to be inserted in the Macros node of your active shortcuts.xml file :

                    <Macro name="Insert Full Current File path" Ctrl="no" Alt="no" Shift="no" Key="0">
                        <Action type="2" message="0"    wParam="42057" lParam="0" sParam="" />    <!--  Insert Blank line Above Current      -->
                        <Action type="2" message="0"    wParam="42057" lParam="0" sParam="" />    <!--  Insert Blank line Above Current      -->
                        <Action type="2" message="0"    wParam="42057" lParam="0" sParam="" />    <!--  Insert Blank line Above Current      -->
                        <Action type="0" message="2300" wParam="0"     lParam="0" sParam="" />    <!--  Down Arrow key                       -->
                        <Action type="2" message="0"    wParam="42029" lParam="0" sParam="" />    <!--  Current Full File path to Clipboard  -->
                        <Action type="0" message="2179" wParam="0"     lParam="0" sParam="" />    <!--  Paste                                -->
                        <Action type="0" message="2300" wParam="0"     lParam="0" sParam="" />    <!--  Down Arrow key                       -->
                    </Macro>
            

            Wherever is your cursor, in current line, this macro writes the full path of your current file, between two pure blank lines, right above the present current line !

            Best Regards,

            guy038

            Elodie CEMOIE 1 Reply Last reply Reply Quote 2
            • Elodie CEMOIE
              Elodie CEMOI @guy038
              last edited by

              @guy038

              Sorry, sorry,… I apologize !
              I had stopped to use N++ about a year ago because of other priorities , and I just restart…
              Thank you very much ,

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