Page 1 of 1

Command Line/Batch File Issue

Posted: 2014-01-22, 18:11 UTC
by zgwstores
In using the COMMAND LINE in TC, I can do the following:

c:\> cd\bat

and the COMMAND LINE changes to

c:\bat>

and the active panel changes from c:\ to c:\bat which is expected.

However, if I create and run a BATCH FILE with these commands, the TC COMMAND LINE prompt does not change, and the active panel also does not change.

If I run the batch file from a DOS window, the prompt/directory changes as expected.

Is there something I need to add to the end of my batch file to have TC recognize the drive/directory changes?

Posted: 2014-01-22, 18:46 UTC
by Sir_SiLvA
you cant change that way path in a running tc

Posted: 2014-01-22, 19:28 UTC
by nsp
cd when used in the command line it is not the shell cd command it is interpreted as the internal TC cd command. This is also possible to call all aliasses you defines.
From a batch file, to change TC folder you should use totalcmd.exe command line parameters or more complicated windows messaging stuff.

Posted: 2014-01-23, 06:31 UTC
by MVV
Batch files are executed in separate process so has no influence on TC. If you run batch file from DOS window using using start command, it won't change your path too.

Easiest way to change TC current dir from batch file is to run %COMMANDER_EXE% /O /S /L="Path".


white, you're right about /O, thank you.

Posted: 2014-01-23, 09:29 UTC
by white
MVV wrote:Easiest way to change TC current dir from batch file is to run %COMMANDER_EXE% /S /L="Path".
You forgot to include parameter /O

TC and command line.

Posted: 2014-01-23, 16:14 UTC
by zgwstores
Thank you so much power users.

As a decade+ user of Norton Commander, I was used to changing the directories via command line, and then I made a batch file for quick navigation to my most used directories.

For example, my batch was called go.bat and I would go %1 would run the command:

goto %1
:%1
C:
cd\data\me\word

I guess now I would
%COMMANDER_EXE% /O /S /L="c:\data\me\word"

What does %commander_exe% represent? TOTCMD.EXE?

Thank you power users.

Posted: 2014-01-23, 16:49 UTC
by Sir_SiLvA
why figgle with the cmd for folders?
go to your most used folders once and press ctrl+d and save them there :!:

Re: TC and command line.

Posted: 2014-01-23, 16:59 UTC
by white
zgwstores wrote:What does %commander_exe% represent? TOTCMD.EXE?
Yes, including full path.

CMD LINE FOR FOLDERS

Posted: 2014-01-23, 19:27 UTC
by zgwstores
"why figgle with the cmd for folders?
go to your most used folders once and press ctrl+d and save them there"


I am a TYPING person, not a mouse person.

Everytime my hand leave the keyboard(or anyone else) to goto a directory I have to:

1. Find the mouse.
2. Fit the mouse to their hand.
3. Move the mouse to wherever it needs to navigate on the screen, in this case FAVORITES.
4. Click the mouse.
5. Scroll the mouse.
6. Click the mouse.
7. Move the mouse to the file I want.
8. Click the mouse.

I can go to the command line, type go data and I am wherever I need to be, CTRL-ALT + 2 characters and ENTER and I have opened the file.

A well designed OPERATING SYSTEM would not require the use of a mouse. The beauty of TC is the INTUITIVE and easy to learn keyboard shortcuts. But, perhaps I am one of the few people who used computers before mouse's(Mice does not seem appropriate here) and know the lack of efficiency the mouse introduced...but I am sure I am getting off topic now.

This is why I love and subscribe to TC. For the most part my fingers never have to leave the security of my keyboard....anyone know of a heated keyboard??? Then they never have to leave the security and warmth of my keyboard!!!

Cheers.

Posted: 2014-01-23, 19:47 UTC
by MVV
zgwstores,
You can use ampersand character before some letter of hotlist item name in order to make shortcut. E.g. with item name Do&cuments it is enough to press Ctrl+D and then C to enter documents dir. It is quite useful feature.

Also you can create your custom commands, e.g. with cd command, and assign shortcuts for them, under Configuration - Misc. page. It is a TC power to be able to assign any shortcut for any internal or custom action.

Posted: 2014-01-24, 09:06 UTC
by ZoSTeR
Ctrl+D + FirstCharOfDir works even without an ampersand.

Re: CMD LINE FOR FOLDERS

Posted: 2014-01-24, 22:26 UTC
by nsp
zgwstores wrote: I am a TYPING person, not a mouse person.
If you are a typing person, you should use some aliases and user command unfortunately no completion is done :(
virtual panel with quickfilter and auto loaded list is also a nice way to manage folder shortcuts with minimal access to the mouse.
I personally use a globing tool that generate lists that i load to virtual panel and use quick filter and [ctrl]->/<-