how to keep in sync with explorer

Oct 1, 2011
11
0
I have windows seven. When I start cmd in the address bar it starts a console window in the same directory as the explorer is. When i start tcc this way it starts in the bin directory of tcc. I almost never use the graphic display, just the console window in tcc. How do I get tcc to start in the same directory that the explorer is when I start the program?
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,689
106
Albuquerque, NM
prospero.unm.edu
On my system both start in C:\, no matter what I have selected in the Folders pane.

How exactly are you starting each? A shortcut, a toolbar button, right-click in the tabs area and "Run", or what?
 
Oct 1, 2011
11
0
On my system both start in C:\, no matter what I have selected in the Folders pane.

How exactly are you starting each? A shortcut, a toolbar button, right-click in the tabs area and "Run", or what?

I type tcc or cmd in the address (field, control, box) of windows explorer, as I explained in my original post. The whole point of my question relies on this. cmd.exe opens in the same folder that windows explorer is when I type cmd in the address control. I use libraries, etc to 'go' to a folder using windows explorer, then type cmd in the address bar and I have both a graphic tool, windows explorer and a console window, cmd.exe, at the same path (location, address). It is simple and elegant, but only works with windows seven as far as I know.
 
May 31, 2008
382
2
I just typed "tcc" in Win7 Explorer's address bar and TCC started in the current folder. Nice trick. Then I typed "tcc /I" to disable loading TCSTART.btm and again TCC started in the current folder. Win7 x32 TCC 14.00.23
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,689
106
Albuquerque, NM
prospero.unm.edu
I type tcc or cmd in the address (field, control, box) of windows explorer, as I explained in my original post. The whole point of my question relies on this. cmd.exe opens in the same folder that windows explorer is when I type cmd in the address control. I use libraries, etc to 'go' to a folder using windows explorer, then type cmd in the address bar and I have both a graphic tool, windows explorer and a console window, cmd.exe, at the same path (location, address). It is simple and elegant, but only works with windows seven as far as I know.

In the address bar? I never would have thought of that. TCC isn't an address....

I tried it here, and it seems to work; TCC starts in the same location shown in the Explorer window. But I have no idea why it works, or how it works. How is Explorer finding TCC: the search path, AppPaths, something else...?

Does it work as you would expect if you type TCC.EXE instead of just TCC ?
 
Oct 1, 2011
11
0
In the address bar? I never would have thought of that. TCC isn't an address....

I tried it here, and it seems to work; TCC starts in the same location shown in the Explorer window. But I have no idea why it works, or how it works. How is Explorer finding TCC: the search path, AppPaths, something else...?

Does it work as you would expect if you type TCC.EXE instead of just TCC ?

Ok, we are finally on to something. There is a difference if you type tcc.exe rather than just tcc. cmd and cmd.exe work the same for unknown reasons. So I guess I am a happy camper concerning my original question.(use tcc.exe)

I did discover something else. If you used a library on your last mouse click or some other non standard folder position, you will be in the \windows\system32 directory instead of where you think you ought to be, when you type cmd in the address field. If you follow the library click with a click on a folder like 'projects', then you are presented with a console at the working directory. So, follow any library clicks with a standard folder click and this works.


I discovered this cmd trick when I noticed that the address bar is also a 'search' field that does incremental search. I don't know how the search history comes into play but there must be some reason why our computers do not respond exactly the same.