Community
    • Login

    Bookmark for saved files

    Scheduled Pinned Locked Moved General Discussion
    14 Posts 7 Posters 1.7k 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.
    • E
      Eltee_7x
      last edited by

      Hello,
      i don’t know if this feature already exists, but it would be very useful to me to have the ability to bookmark files just like a browser does with URLs.

      Right now i find myself keeping important files always open (for months or even years) so to not lose them, but this quickly clutters the interface with many tabs always open that only grow over time.

      Is there a way to have a simple bookmark of files just like browsers do? Something that can perhaps be organized in folders and easily searched (perhaps even via tags)?

      Thanx.

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

        @Eltee_7x

        Well, you could keep ONE file that contains a list of paths to your other files of interest, e.g.:

        c:\mydir1\myfile1.txt
        d:\mydir2\mydir3\mydir4\myfile2.txt
        e:\myfile3.txt
        

        And then when you want to open one of those files to work on it, select it, right-click that selection, then choose Open File:

        4751812b-2022-4ee3-afda-b56163107e02-image.png


        You could also do this:

        file://c:\mydir1\myfile1.txt
        file://d:\mydir2\mydir3\mydir4\myfile2.txt
        file://e:\myfile3.txt
        

        and the advantage there is you get clickable links:

        c70d9787-9804-4d36-a4d3-29d7950e6380-image.png

        The disadvantages with that approach might be that you may not have your file types associated with Notepad++ (so that they open in Notepad++ when the link is double-clicked), and if you have spaces in the name of your file it breaks this mechanism.


        Another option is the Explorer plugin that offers a “Favorites” feature, where you could put all of the files you want to “bookmark”.

        1 Reply Last reply Reply Quote 4
        • CoisesC
          Coises
          last edited by

          On Windows 10, if you right-click a program’s icon in the Start menu list, Start menu tiles or in the taskbar (including pinned icons), the menu includes a list of recently-opened files. When you place the mouse cursor over a file name, Windows shows a pin icon at the right which you can click to pin that file to the list. (It won’t work, unfortunately, with a desktop shortcut.)

          I do not know if Windows 11 retains that feature.

          1 Reply Last reply Reply Quote 1
          • E
            Eltee_7x
            last edited by

            Thank you for your answers.

            @Coises i didn’t know about this in Windows, thank you for pointing it out, unfortunately i have many files i would like to keep track of and i have disabled several Windows features for privacy concerns and i would like to have the ability to categorize my bookmarked files and search through them via keywords and/or tags so i guess your solution doesn’t work well for me at this time.

            @Alan-Kilborn thank you for the suggestion, i believe i’ll do as you said. It just surprises me that Notepad++ doesn’t have a bookmark for files considering how many tools and options it offers out of the box, it seems to me a pretty common functionality to have but i guess i’m the only one that feels the need for such a thing. I’ll give a try to the plugin you suggested as well.

            Mark OlsonM mkupperM 2 Replies Last reply Reply Quote 2
            • Mark OlsonM
              Mark Olson @Eltee_7x
              last edited by

              @Eltee_7x
              One other option that could work: the default directory setting could set the default directory for open/save dialogs to a directory with a bunch of shortcuts to files and directories of interest, like so:
              580726d1-57b7-4e1f-a936-3de8111a283d-image.png
              And then every time you use File->Open, you’re greeted with this:
              d3c2db16-3994-4aa7-9c7f-4298df0efc48-image.png

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

                Hello, @eltee_7x, @alan-kilborn, @Coises and All,

                With my portable installs of N++, I played around with the Open file option of the Context Menu and it seems that a file can be opened if, either :

                • The file belongs to the current directory ( I mean belongs to the folder of the current tab )

                • The file belongs to the N++ intall directory


                If none of these conditions is true, the message The file you're trying to open doesn't exist is displayed !

                Thus, may be the error message could be improved, by adding, both, the absolute path of the current tab and the absolute path of N++ installation

                Best Regards,

                guy038

                1 Reply Last reply Reply Quote 1
                • mkupperM
                  mkupper @Eltee_7x
                  last edited by

                  @Eltee_7x - It appears that @Alan-Kilborn’s first suggestion will satisfy all of your current requirements and needs.

                  A plain text file can contain file://… links to your files along with categories, tags, descriptive text or any other explanation. You can organize, order, and search the entries as much as you desire.

                  It’s also very easy for you to maintain backups and/or archives of your plain text bookmark file(s). For example, while web browsers, Microsoft Office, and Windows all have their own, and unrelated, bookmark systems it’s unlikely that people have backups, much less archives, of their bookmarks.

                  As they are plain text files there are thousands of tools available that can be used to work with your bookmarks.

                  There are no restrictions on the length or structure of the entries in your personal plain text bookmark file. If you find working with a single bookmark file to be cumbersome then break it into two or more files.

                  When I have several files related to single project I have developed habit of inserting a “See also” section at or near the top of each file that contains file://… links to the files in the project. I have the same “See also” section at the top of each file in the project. That allows me to jump from file to file within the project. Thus, I normally only “bookmark” the main file for a project and then use the “See also” sections to jump to other files.

                  With extra work you can even add color coding by inventing a new file extension, .bookmark for example, and writing a Notepad++ UDL that’ll color code your .bookmark files.

                  It’s outside the scope of Notepad++ but something else I do is to keep the main files for my projects in a few selected directories/folders. I have a command line script, zp.bat, that searches those directories/folders by file name and opens any files that match though if there are many matches it instead gives me a list of the matching files. One of my projects is a file named Notepad++-plus-plus-npp.txt. If I want to open my Notepad++ related file I do can do zp notepad or zp npp and it opens Notepad++-plus-plus-npp.txt. There is a similar script, zpp.bat that scans both the file names and file contents meaning if I sort of remember something then zpp.bat bat is both still much faster than a full disk scan but is also a much deeper scan than just by file names. I also add tags to my files and use zpp.bat to search for and open files that contain a tag. Thus, I don’t have a main bookmarks file but instead use zp.bat and zpp.bat as my “bookmark manager.”

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

                    @mkupper said in Bookmark for saved files:

                    It appears that @Alan-Kilborn’s first suggestion will satisfy all of your current requirements and needs.

                    But, again, that suggestion is dead-on-arrival if OP likes to use spaces in his/her file paths.

                    If one does use spaces, but likes the general idea of my earlier suggestion, there’s a scripted solution presented HERE to cure the shortcoming, although it lacks the simplicity of just being able to do file://....

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

                      Hi, @eltee_7x, @alan-kilborn, @Coises, @mark-olson and All,

                      My Bad ! My previous post just spoke about filenames without any path ! But, of course, you can access any file if you provide its absolute path ;-))

                      Sorry for the confusion !


                      Now, regarding the hyper-links method, the leading correct syntax is file:/// ( and not file:// )

                      • This syntax must be followed with an absolute path ( not a relative one ! )

                      • This absolute path may contain, either, slashes or anti-slashes to separate the different elements of the path

                      • Each file is opened with its associated program

                      => This means that file:///C:\test.doc will be opened with Word, file:///C:/test.xls will be opened with Excel and file:///C:\Test.txt will be opened with Microsoft Notepad

                      • If the filepath contains the 3 symbols below, simply replace them with their %hh equivalent syntax :

                        • SPACE -> %20

                        • { -> %7B

                        • } -> %7D

                      • In addition, any accentuated character will also be replaced with its %hh syntax ( For instance, any é char will be rewritten %E8 )

                      • All other ASCII punctuation can be written as is !


                      So, @alan-kilborn, your hyper-links should simply be expressed as :

                      file:///c:\mydir1\myfile1.txt
                      file:///d/mydir2/mydir3/mydir4/myfile2.txt
                      file:///e:\myfile3.txt
                      

                      With that correct syntax, just replace any space character, either, in a folder or a file, with %20 to get a functional hyper-link !

                      Best Regards

                      guy038

                      Alan KilbornA 2 Replies Last reply Reply Quote 3
                      • Alan KilbornA
                        Alan Kilborn @guy038
                        last edited by Alan Kilborn

                        @guy038 said in Bookmark for saved files:

                        the leading correct syntax is file:///

                        This is true; as this has been discussed before in other threads, how could I have dropped the 3rd forward slash now?!

                        It seems there were some other limitations with file:/// but I can’t find any now, so this seems to be a pretty good solution for the original problem of this thread.




                        any accentuated character will also be replaced with its %hh syntax ( For instance, any é char will be rewritten %E8 )

                        I don’t know; I had no problems with this, for example:

                        file:///C:\NotepadPlusPlus\Misc\Test%20Data\Filenames_with_special_characters\kopiëren_folder\kopiëren2.txt




                        If the filepath contains the 3 symbols below, simply replace them with their %hh equivalent syntax

                        And to make this easy:

                        • copy a file tab’s pathname into your document

                        • select the entire path text

                        • run this Regular expression replacement operation on it (In selection): find: ( )|([)|(]) replace: (?1%20)(?2%7B)(?3%7D)

                        • make a macro out of that replacement, for easy future use

                        1 Reply Last reply Reply Quote 3
                        • Alan KilbornA
                          Alan Kilborn @guy038
                          last edited by Alan Kilborn

                          @guy038 said in Bookmark for saved files:

                          file:///d/mydir2/mydir3/mydir4/myfile2.txt

                          I could not get this one to work (where the drive letter colon is replaced by a /).

                          @guy038, was this just a typo on your part, and it should have been?:

                          file:///d:mydir2/mydir3/mydir4/myfile2.txt

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

                            Hello, @alan-kilborn and All,

                            Oh…, you’re right; it:'s a typo ! Of course, the two correct syntaxes are :

                            • file:///d:\mydir2\mydir3\mydir4\myfile2.txt

                            • file:///d:/mydir2/mydir3/mydir4/myfile2.txt

                            BR

                            guy038

                            1 Reply Last reply Reply Quote 2
                            • Karlo-FK
                              Karlo-F
                              last edited by Karlo-F

                              Wait…
                              What about Project Panels?
                              https://npp-user-manual.org/docs/session/#project-panels

                              The Project Panels are similar to the Folder as Workspace panel, but allow you to organize the tree view to your liking, rather than being forced to follow the Windows filesystem hiearchy.

                              Double-clicking on a file from the tree-view will open it as a new tab in the Notepad++ editor (or will activate that tab if it’s already open). Closing the tab for a file from the Project will not remove it from the Project panel, so it’s easy to re-open that file.

                              I have a list of often used files sorted by folders (according to my needs, not by Windows filesystem hierarchy) and it works fine for me. And works fine with spaces in file names.

                              Karlo-FK 1 Reply Last reply Reply Quote 4
                              • Karlo-FK
                                Karlo-F @Karlo-F
                                last edited by

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