View Full Version : Open containing directory
CrispinH
23-Jun-2005, 01:38 AM
It would be handy to have a context menu (aka right-click) option to open the containing directory of a file. Some file comparisons (eg Word documents) are best done with the appropriate application rather than binary compares.
Crispin
Ernie
23-Jun-2005, 05:49 AM
Simply add an entry to your "Open With Applications" (Tools -> Options -> Open With).
Click New and enter Explorer for the description and enter explorer.exe "%p" for the command line. Check out the online help for more information on setting up "open with" applications.
Next time you right-click on a file name, the Open With context menu will have this new entry to open the containing folder.
Lutz
05-Sep-2006, 04:08 AM
Enter explorer.exe /n,/e,,/select,%f to select the file directly. This also works with folders and even if multiple files/folders are selected (opens one Explorer for each selected item).
Greetings Lutz
markf_2748
05-Sep-2006, 10:39 AM
Lutz's suggestion works nicely but I find that %f must be inside double quotes to locate the file path. Also, the double coma appears to be unecessary. i.e.
explorer.exe /n,/e,/select,"%f"
However, no matter how many files and/or folders are selected, I only get one explorer window to open. Not sure why.
I have wanted this capability for a long time. Thanks.
With Build 240, this option only seems to work with files, but for directories there is a built-in "Explore" under the Open With menu (I used "Explorer" for the description of Lutz', and "Explorer P" for the previous suggestion, so "Explore" is something different.
Also, my right-click has an "Explorer" item right under "Open With", which seems to give access to many of the right-click options you'd see in Explorer, including "Slect Left Side to Compare" ;-}
/dps
Lutz
07-Sep-2006, 03:49 AM
Hi Mark,
I'm sure, You didn't check 'multiple instances' in the 'advanced' section of the (Tools -> Options -> Open With) Explorer-Item. For default these properties are hidden.
There are also the options to treat files and/or folders.
Greetings Lutz
markf_2748
07-Sep-2006, 10:07 AM
Hello Lutz,
Cool, very cool. Checking 'multiple instances' as you suggest [...Edit(explorer.exe)->Advanced] solved the problem. Now I can open multiple explorer windows by selecting multiple files and using the local (RMB) menu "Open With -> Explorer".
However, when I select multiple files I cannot open multiple instances of their associated applications. In fact, when I select multiple files, "Associated App" disappears from the "Open With" local (RMB) menu. Not a great loss, but perhaps it could be nicer.
Thanks.
Lutz
08-Sep-2006, 01:31 AM
Hi Mark, I have two remarks:
In fact, when I select multiple files, "Associated App" disappears from the "Open With" local (RMB) menu.
Just add a new 'open with'-Item (ie named 'AssoApp') with the command line 'cmd /c start %f' accepting files, folders and multiple instances.
To open multiple files in one instance of an application is not possible yet, but I posted this before (http://www.scootersoftware.com/ubbthreads/showflat.php?Cat=0&Board=general&Number=5648&Searchpage=1&Main=4832&Words=%26quot%3Bto+one+instance%26quot%3B&topic=&Search=true#Post5648) and its already on the legendary wish list.
Greetings Lutz
markf_2748
08-Sep-2006, 11:12 AM
Lutz wrote:
[/quote]
Just add a new 'open with'-Item (ie named 'AssoApp') with the command line 'cmd /c start %f' accepting files, folders and multiple instances.
[/quote]
I could not get the above syntax to work. Perhaps you could post an example Open With Command Line entry.
Lutz wrote:
[/quote]
To open multiple files in one instance of an application is not possible yet
[/quote]
To my surprise, I find that the following "Open With" Command Line opens multiple highlighted *.PDF files in a single instance of Acrobat (no quotes and no %f used):
C:\Program Files\Adobe\Acrobat 7.0\Acrobat\Acrobat
What I would really like is an "Open With" which will perform this action without having to create a special menu entry for each associated application.
MarkF
Lutz
11-Sep-2006, 01:38 AM
Hello Mark!
I tried the command line with some folders and (local) word documents only and this worked.
Now I tried some other files and figured out, that UNC-paths (limitation of the cmd-shell) and clearcase elements without execute-rights ('access denied') don't work.
What files did You use?
Nevertheless the selected files must have an associated application (Windows-Explorer/Extras/Folder Settings/File types) otherwise a Windows-'open with' dialog should appear.
The behaviour You mentioned with PDF-files seems to have two reasons: %f might be optional in BC-open with-commands (Scooter?) and Acrobat only opens one instance to show multiple files (some programs are configurable to open new files in an existing or a new instance).
Perhaps someone knows an alternative shell-command (I think BC uses a windows call for the associated application).
Greetings Lutz
Chris
14-Sep-2006, 12:39 PM
%f might be optional in BC-open with-commands (Scooter?)
Yes, %f is optional. If you only include a path to a program and nothing else, it should just pass the filename.
vBulletin® v3.7.1, Copyright ©2000-2013, Jelsoft Enterprises Ltd.