Bookmark for saved files
-
@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:
And then every time you use File->Open, you’re greeted with this:
-
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
-
-
@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 dozp notepad
orzp npp
and it opensNotepad++-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.” -
@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://....
-
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 notfile://
)-
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 andfile:///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
-
-
@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
-
-
@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
-
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
-
-
Wait…
What about Project Panels?
https://npp-user-manual.org/docs/session/#project-panelsThe 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!