Explore containing folder instead of open containing folder - windows

I use Visual Studio to do a lot of my coding. I find the open containing folder feature quite helpful. But I don't want the folder to be "opened" by the windows explorer, instead I want to "explore" the folder -- you know, get the nice little frame showing me all the other folders on the left hand side. Does anyone know how to do this?
Thank you,
Rohit

When invoking ShellExecute(), use the explore verb instead of the open verb: http://msdn.microsoft.com/en-us/library/bb762153%28VS.85%29.aspx.
Edit: If you don't mean programmatically, open Windows Explorer, go to Tools -> Folder Options, select the File Types tab, locate the Folder entry in the list (not File Folder!), click Advanced, and set "explore" as default instead of "open".

There really isn't much difference anymore between 'explore' and 'open' if you're talking about a folder. They both open the same window, just with different options active. When you 'open' the folder, you're only one click away (on my system at least) from seeing the folder tree as well- just click the "Folders" button in the toolbar.

Related

Folder view doesn't work?

So I am trying to get into C# as it is used for a lot of things.
I want folder view so that I can click on a folder and put a file in there without having to go to file explorer. The problem is, when I go to Solution explorer, click on my project, click on folder view, It does nothing. I actually don't know if it is worth it to go through all this trouble but I thought I might give it a shot.
I think you can only enter folder view from the solution level (rather than project). In Solution Explorer, single click on the solution you have open. Then, click the folder view icon at the top of the Solution Explorer. This will toggle the view to folder view mode.

Copy file full path in Xcode

I'm using Perforce for managing our code base. In Perforce, we need to check out a file before we can edit it. When I'm working in Xcode, sometimes I want to know the full path to the working file so that I can check it out in Perforce.
So here is my question:
Is there a shortcut, plugin or some other quick way to copy the full path of a file in Xcode?
What I have known:
I can Command+click on the file tile to show up the full path, but I cannot copy it.
In Visual Studio, we can right click on the file's tab and choose Copy Full Path to achieve this.
In Eclipse, we can Alt/Option + Enter to achieve this.
Update:
Actually my question is about how to achieve the equivalent Copy Full Path feature inside Xcode. Anyway, dragging the file to the terminal is also a very nice workaround.
You can copy it directly out of the File Inspector. The first section ("Identity and Type") of the File Inspector shows information about the selected file, or the file that contains the selected symbol, etc. You have Name, Type, Location, and Full Path. You can select the full path and copy it.
As a shortcut, a triple click on any part of the path will select the entire path. There's also a small icon with a light arrow on a dark background -- clicking that will open a Finder window with the file selected.
You can drag it to a terminal... Easy and fast...
on your editor XCode (you want to get the file path). Press:
Command+Shift+J
xcode will open directory file path on Project Navigator (left side bar)
and then drag-and-drop file from Project Navigator to the terminal. it will give you the directory of the file.
You can use find command to copy file path:
cd myProject
find . -name myCodeFile.cpp
Extending Caleb's answer, here is a graphical demo:
Steps:
Select a filename on the Project navigator from the left side Navigator panel.
Tap on Show File Inspector from the right side Inspectors panel. (marked with red box)
Copy the path from there. (marked with a bigger red box)

I changed .jar to open with windows explorer, and now i can't change it to anything else

I recently changed the Default application for .jar files to be windows explorer, thinking that it would unzip them. I have since gotten a jar decompiler and would like to make windows explorer not the default application to open jar files ( as it basically crashes my computer). Nothing works, i have tried changing the default application by clicking open with, but the check box is greyed out. I have tried going Start menu -> Default Programs -> Associate a file type, but .jar doesn't even appear in the list. I have been googling for a couple hours now and can not find any response that isn't basically those two steps.
Does anyone have any idea how to fix this mess i made ?
Right click on a .jar, go to "Open With" > "Choose default program..." should do the trick. But you already did that, and "Choose default program..." was grayed out.
Edit:
Try FileTypesMan from Nirsoft
http://www.nirsoft.net/utils/file_types_manager.html
Go to .jar and select it, then you can see actions at the bottom and remove or edit them.
I Was able to fix it by messing around in the registry.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.jar\UserChoice
needed to be deleted. that let me choose a new default program for.jar files. Thank you for the responses.
Cheers.

How is "Add Existing Item..." in Visual Studio meant to work?

I never use "Add existing item..." feature in Visual Studio's Solution Explorer because it is confusing:
it seems to me the way it should work is that if you have a Customer.cs file in Models directory, that you could choose "Add existing item", it would then show you which items exist in that directory an allow you to choose one. Instead, it opens a file dialogue to some seemingly random directory on your hard drive, and I'm not sure if it is going to make a copy of that file, or use it outside the solution, etc.
instead, if I want to "add an existimg item", I go into windows explorer, click file, CTRL-C, click folder in solution explorer, ctrl-v, and it is clear
Do others do it differently? Am I missing something about how "add existing item" in solution explorer is supposed to work?
The folder opens where-ever you last left it...
As for using this feature; by default (Add) it does IMO the least useful thing; copy the file. But if you notice, the add button is actually a drop-down; hit the down arrow and you can add a link to the file - i.e. leave it where it is and reference it by location (Add As Link).
The quick and easy way to do what you are trying to do (add an existing file that already exists within the folder in your project) is:
At the top of the Solution Explorer window is an icon/button for "Show All Files", enable it (if it is already enabled and the file you are looking for is not shown, click "Refresh"). Note that this setting is enabled on a per project basis.
Right click on the file that you want to include and select "Include in Project".
Add Existing file adds the file to the project. Keeping it in the project directory is something different and making it a part of the project is something different. By making it a part of the project, its entry is made in .csproj/.vcproj/etc and then further properties can be set of this file such as specifying a custom build step etc.
And No, it doesn't create a copy of the file in your current project's directory in case of a Visual C++ project. In case of a CSharp Project, it does create a copy.
e.g., I use this when I need to add a bitmap/png file in my project which I have gotten from an external source. I just copy the file to my project directory and then use Add Existing File to add this to the project.
I'm using it. I even didn't know it's possible to ctrl+c ctrl+v in solution explorer.
It's particulary handy, if you want to add something 'as link'.
I do use it but often I just add file as a link. That make it easier to maintain some common classes if you do not want to make full assembly out of them.
As far as my experience goes using this function, it does the same copy and paste that you are describing.

Moving files from one Visual Studio solution to another

What I usually do is create a new file in the solution where I want to use it (same name), copy & paste the contents of a class from the source solution to the target, fix the namespace & imports as needed.
The only other way I know to do it is open the source file in the target solution and then just save a copy into that folder, which can get confusing with two files open with the same name in one solution.
Does anyone have an easier way to do this?
You can just copy and paste the files themselves.
When you have your solution open, look at the top of the solution explorer and you'll see an icon that looks like a page with a page outline behind it and a yellow page (not a very intuitive icon). This is the "show all files" button. Click that and you'll see all the files in your currently selected project (it is project-specific). Highlight any files that you want to include, right-click, and select "Include in Project."
You could just copy the file with Explorer. Or better yet, start refactoring your projects so that you'll create assemblies that are usable by multiple client projects.

Resources