How to open a path in Windows Explorer?
I have a need to quickly search for files and folders. We are limited on the software we can install and notepad++ is one of the few options. So I have resorted to batch creating text files of the folder structure on a regular basis in order to search in notepad++, an example is below:
dir C:\ /b /s >> “Drives.%date:~-4,4%-%date:~-10,2%-%date:~-7,2%.txt”
Is there a way to have notepad++ launch a Windows explorer window for a path if I highlight the folder path (or path and filename) in the search results window? Or treat each line as a file link? Many of the folders and files have spaces in them.
Any help would definitely be appreciated! I am just beginning to see how much effort has gone into this program.
Scott Sumner last edited by
Well, the first thing that comes to mind is that if you double-click something in the Find result panel, it will open the file and then you can right-click the tab of the opened file and choose Open Containing Folder in Explorer.
Thanks, but that will just open the folder that contains the index file I am searching. I can select a folder path line in the results and copy it to the clipboard from the right click menu, ideally I would add an option to the menu to add “Open in Explorer”.
Scott Sumner last edited by
I get it now…the path you would want to open is in the actual results. I think the best existing solution would be to highlight the directory part of that path, copy it to clipboard, then do Windows Start menu and do a paste into where it says “Search programs and files” (this is for Win7, no idea how MS has mutated the Start menu post-Win7). Pressing Enter should then open an Explorer window in that folder.
You asked for existing methods, but I don’t believe there are any. The above is what is known as a “workaround”. If you want to see something like an “Open in Explorer” option to a menu, you are free to want that and also free to request it.
That is how I have been opening the folders. I just saw that if I double click on a line in the search results panel, it will go to that result in the main panel. If I select that text, then I can select
Edit>On Selection>Open Containing Folder in Explorer
and open the folder. Now if I could assign a keystroke to that command, it would expedite the process. I updated the contextmenu.xml file to add this command to the right click menu, that helps.
This only works if I select the text. If I select the entire line, it does not work.
gurikbal singh last edited by
@Mark-Creager you are right here
PeterJones last edited by
You can map a shortcut to Edit>On Selection>Open Containing Folder in Explorer.
Go to Settings > Shortcut Mapper > Main menu, and scroll down to “Open Containing Folder in Explorer” – which is line #79 in mine, but it may vary from installation to installation. Oh, right, in new enough Notepad++, there is a “Filter” box: if you type “Containing”, you should easily find that line. Click on “Open Containing Folder in Explorer”, then Modify. Pick your keyboard shortcut, then Ok and Close.
Thanks, @PeterJones . You are correct, I could map it, found it at no 78 on my list - I only have version 7.4.1 available to install. Appreciate the help from everybody.