Command Line/Batch File Issue
Moderators: Hacker, petermad, Stefan2, white
Command Line/Batch File Issue
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?
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?
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.
From a batch file, to change TC folder you should use totalcmd.exe command line parameters or more complicated windows messaging stuff.
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.
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.
Last edited by MVV on 2014-01-23, 11:06 UTC, edited 1 time in total.
TC and command line.
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.
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.
Re: TC and command line.
Yes, including full path.zgwstores wrote:What does %commander_exe% represent? TOTCMD.EXE?
CMD LINE FOR FOLDERS
"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.
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.
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.
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.
Re: CMD LINE FOR FOLDERS
If you are a typing person, you should use some aliases and user command unfortunately no completion is donezgwstores wrote: I am a TYPING person, not a mouse person.

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]->/<-