Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What should I add to the following command (in shortcuts.xml) so that Notepad++ would open the containing folder and also select the current file?

<Command name="Open containing folder" Ctrl="no" Alt="no" Shift="no" Key="0">explorer $(CURRENT_DIRECTORY)</Command>

Thank you.

share|improve this question
    
The following command opens the folder and selects the file. I'm still looking for a way to open the folder maximized. &quot;C:\Windows\Explorer.exe&quot; /select, &quot;$(FULL_CURRENT_PATH)&quot; Thanks. –  Yaron Jul 1 at 18:38

1 Answer 1

up vote 0 down vote accepted

I can find it in my Notepad++ v6.6.9. working out-of-the-box:

  1. Right-click tab of desired document.

  2. From context menu, select Open Containing Folder in Explorer.

    ▶ This command not only opens given folder, but also selects current file.
       In Notepad++ source code you can see that the menu command performs the same as yours:      explorer /select,$(FULL_CURRENT_PATH) so you do not need to add it by yourself.
       And you can also check similar question for the command line.

share|improve this answer
    
Thanks. I wanted to select the file. I use the following code: &quot;C:\Windows\nircmd.exe&quot; exec max &quot;C:\Windows\Explorer.exe&quot; /select, &quot;$(FULL_CURRENT_PATH)&quot; –  Yaron Sep 27 at 0:29
    
@Yaron - You didn't test steps given in the asnwer, did you? My apologies for not explicitly stating the result of the command. Now you can find it in the edited answer (last paragraph). –  miroxlav Sep 27 at 11:35
    
Thank you miroxlav. I appreciate your help. It's been a while since I posted this question, and I apologize for not elaborating a bit more. I use NP++ v6.4.5. More recent versions have some problems with RTL languages (e.g. Hebrew). I also wanted the window to open maximized, and hence the use of nircmd. If you have a better way, please let me know. I'd be grateful. nirsoft.net/utils/nircmd.html –  Yaron Sep 28 at 13:44
    
@Yaron - I missed your point with maximized window, sorry for that. For such a purpose, nircmd does its job well. –  miroxlav Sep 28 at 13:51
    
Thanks again. It's kind of you. I didn't mention the "maximized window" in the original question. You didn't miss it. :) I appreciate your help. –  Yaron Sep 28 at 13:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.