1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to keep in sync with explorer

Discussion in 'Open Forum' started by Tristram Shandy, Jun 19, 2012.

  1. Tristram Shandy

    Joined:
    Oct 1, 2011
    Messages:
    11
    Likes Received:
    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?
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,288
    Likes Received:
    39
    How are you starting TCC?

    Do you have anything in your TCStart.btm file which might change the directory?
     
  3. Tristram Shandy

    Joined:
    Oct 1, 2011
    Messages:
    11
    Likes Received:
    0
    no, I do not have a tcstart.btm it is plain vanilla, the way it was installed.
    Does tcc work like cmd in your computer?
    thanks,
     
  4. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,288
    Likes Received:
    39
    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?
     
  5. Tristram Shandy

    Joined:
    Oct 1, 2011
    Messages:
    11
    Likes Received:
    0
    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.
     
  6. Stefano Piccardi

    Joined:
    May 31, 2008
    Messages:
    376
    Likes Received:
    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
     
  7. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,288
    Likes Received:
    39
    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 ?
     
  8. Tristram Shandy

    Joined:
    Oct 1, 2011
    Messages:
    11
    Likes Received:
    0
    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.
     
  9. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,288
    Likes Received:
    39
    I have to wonder whether Explorer is picking up a TCC.LNK file somewhere, and that .LNK file has a startup directory specified. Does WHICH TCC.LNK find one?
     
  10. Stefano Piccardi

    Joined:
    May 31, 2008
    Messages:
    376
    Likes Received:
    2
    Not here, but does it matter? It's Explorer that finds TCC not TCC itself.
     
  11. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,288
    Likes Received:
    39
    True, but after a little testing, I think Explorer is searching the path and AppPaths -- much like TCC. If WHICH finds a .LNK file, it seems likely that Explorer will find it too.
     

Share This Page