Notepad++ Open containing folder and SELECT FILE

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Yaron
Posts: 14
Joined: 02 Apr 2014 21:48

Notepad++ Open containing folder and SELECT FILE

#1 Post by Yaron » 30 Jun 2014 08:39

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?

Code: Select all

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



Thank you.

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: Notepad++ Open containing folder and SELECT FILE

#2 Post by Squashman » 30 Jun 2014 09:35

FYI. OP also posted on the N++ forums.
http://sourceforge.net/p/notepad-plus/d ... it=50#1ead

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Notepad++ Open containing folder and SELECT FILE

#3 Post by foxidrive » 30 Jun 2014 09:44

Thanks Squashman. I'm sure that a truckload of posters copy and paste their question onto a dozen forums.

Yaron
Posts: 14
Joined: 02 Apr 2014 21:48

Re: Notepad++ Open containing folder and SELECT FILE

#4 Post by Yaron » 01 Jul 2014 12:28

Hi foxidrive,

If posting in multiple forums is contrary to the conventional etiquette, I apologize.

The following command opens the folder and selects the file. I'm still looking for a way to open the folder maximized.

Code: Select all

&quot;C:\Windows\Explorer.exe&quot; /select, &quot;$(FULL_CURRENT_PATH)&quot;



Thanks.

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Notepad++ Open containing folder and SELECT FILE

#5 Post by ShadowThief » 01 Jul 2014 12:54

Code: Select all

cmd /c "start /max C:\Windows\Explorer.exe /select, $(FULL_CURRENT_PATH)"

Yaron
Posts: 14
Joined: 02 Apr 2014 21:48

Re: Notepad++ Open containing folder and SELECT FILE

#6 Post by Yaron » 01 Jul 2014 13:16

Thank you. I appreciate your help.

Do you know how to adapt the code to "shortcuts.xml"? I couldn't make it work.

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Notepad++ Open containing folder and SELECT FILE

#7 Post by ShadowThief » 01 Jul 2014 13:18

Code: Select all

cmd /c "start /max C:\Windows\Explorer.exe /select, $(CURRENT_DIRECTORY)\shortcuts.xml"


should work.

Yaron
Posts: 14
Joined: 02 Apr 2014 21:48

Re: Notepad++ Open containing folder and SELECT FILE

#8 Post by Yaron » 01 Jul 2014 14:30

Thanks again. It's kind of you.

I meant how to use the code in the file "shortcuts.xml".

This works:

Code: Select all

cmd /c &quot;start /max C:\Windows\Explorer.exe /select, $(FULL_CURRENT_PATH)&quot;


Is it possible to hide the Dos window which pops up for a second?

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Notepad++ Open containing folder and SELECT FILE

#9 Post by ShadowThief » 02 Jul 2014 02:20

Yaron wrote:Thanks again. It's kind of you.

I meant how to use the code in the file "shortcuts.xml".

Image

And then set the shortcut to whatever you want.

Yaron wrote:Is it possible to hide the Dos window which pops up for a second?

The command prompt will always flash.

Yaron
Posts: 14
Joined: 02 Apr 2014 21:48

Re: Notepad++ Open containing folder and SELECT FILE

#10 Post by Yaron » 02 Jul 2014 06:53

Thank you. I really appreciate it.

Post Reply