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

Sync folder/list view with command window?

Discussion in 'Support' started by MykeJB, Nov 29, 2012.

  1. MykeJB

    Joined:
    Nov 29, 2012
    Messages:
    2
    Likes Received:
    0
    Is it possible to have TCC keep the folder/list view in sync with the current folder of the command prompt? For example, if I select a folder in the folders view can TCC automatically switch to that folder? Similarly if I change directory in TCC can the folder view automatically focus to the new directory?

    Mike
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    Here's my stock answer to this question:

    It can be done (but you really don't want to do it!). People periodically ask for either this or the reverse (moving the folder to match the CWD of the command line), but they invariably change their minds after trying it.

    There are several serious drawbacks:

    1) It will only work with TCC. No CMD, bash, PowerShell, etc.

    2) It is a really, really, really bad idea to try it if you have more than one tabbed window.

    3) TCC can only change its directory after executing a command line. You REALLY don't want TCC doing it in the middle of a command!

    4) It will make drag & drop between the view windows & the TCC windows useless.

    But if you want to personally experience the pain before deciding it's a bad idea, see "Take Command and TCC Integration" in the help. You can use the internal variables or CDD /T (or /TO) to change the directories as desired (usually in your PRE_EXEC alias).
     
  3. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    I use 2 aliases to handle the folder synchronization at the TCC prompt.

    Code:
    here=*cdd /to .
    there=if "%_tcfolder" ne "" cdd "%_tcfolder"
    "here" sets the folder view to the current directory at the TCC prompt.
    "there" changes the current TCC prompt directory to match the selected folder in the folder view.
     

Share This Page