By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Sync folder/list view with command window?

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?

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).
I use 2 aliases to handle the folder synchronization at the TCC prompt.

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.

Similar threads