Bookmark for saved files
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)?
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:
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:
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”.
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.
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.
With my portable installs of N++, I played around with the
Open fileoption 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 existis 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
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 nppand 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.”
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
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
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.docwill be opened with Word,
file:///C:/test.xlswill be opened with Excel and
file:///C:\Test.txtwill be opened with Microsoft Notepad
If the filepath contains the
3symbols below, simply replace them with their
%hhequivalent syntax :
In addition, any accentuated character will also be replaced with its
%hhsyntax ( For instance, any
échar will be rewritten
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
spacecharacter, either, in a folder or a file, with
%20to get a functional hyper-link !
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:
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:
make a macro out of that replacement, for easy future use
Hello, @alan-kilborn and All,
Oh…, you’re right; it:'s a typo ! Of course, the two correct syntaxes are :
What about 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.
This post is deleted!