Select files by mask without numerical keyboard

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
stridder
Junior Member
Junior Member
Posts: 4
Joined: 2015-05-25, 07:36 UTC

Select files by mask without numerical keyboard

Post by *stridder »

Hi guys,
I use a Thinkpad T430 notebook that does not have a numerical keyboard, not even possible to enable it with Fn key and thus I cannot press NUM+ e.g.
Is it possisble to select group of files by mask (e.g. *.sh) without special numerical keys?
Keyboard shortcut is preferable, though even a menu option will do if there is no other way.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You can find some selection commands in Mark menu, also you can assign shortcuts for any selection commands using Configuration - Misc. dialog.
User avatar
nsp
Power Member
Power Member
Posts: 1805
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

MVV wrote:You can find some selection commands in Mark menu, also you can assign shortcuts for any selection commands using Configuration - Misc. dialog.
as said by MVV, You can assign another key to cm_selectFiles or make a button or create an alias ...
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

nsp,
There are much more useful selection commands, not only cm_SelectFiles.

These commands process both files/folders without Shift and only files with Shift by default (Shift behaviour may be reversed using INI option MarkDirectories=0 to be more consistent with Norton Commander):
cm_SpreadSelection ([Shift+]Num +)
cm_ShrinkSelection ([Shift+]Num -)
cm_ExchangeSelection ([Shift+]Num *)

Also in numeric block:
cm_SelectCurrentExtension (Alt+Num +)
cm_UnselectCurrentExtension (Alt+Num -)
cm_RestoreSelection (Num /)

So at least 9 commands are lost if no numeric block available.
stridder
Junior Member
Junior Member
Posts: 4
Joined: 2015-05-25, 07:36 UTC

Post by *stridder »

Is there a configuration file I could load that assigns another keys to select (and possibly other shortcuts requiring Num keys)?
Lots of people use notebooks so this issue should be common.
What is an alias and how is it configured?
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

stridder,
You can try searching forum but I can't remember any topic with such ideas - you can share your ideas with other users. You should just try different combinations (e.g. Alt+Backspace and Alt+Delete for selecting and deselecting files) and find out which one is better for you.
However different people configure TC in a very different ways so one's shortcuts may conflict with another's shortcuts (e.g. you do some thing with a key but another user does completely another thing with same key).

Aliases are short names for commands - for people who like executing commands from TC command line.
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

2stridder

Use Hotkeys Editor
to assign different hotkey for those commands.
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

How-to use ALIAS in command line, run internal commands

Post by *Stefan2 »

 

Me think using ALIAS in command line is a good idea.

Configuration > Options... > Layout [X]Command line

Define Alias in gui "Configuration > Options... > Misc." or directly in TC folder\wincmd.ini

Code: Select all

[Alias]
sel=cm_SpreadSelection                 ;([Shift+]Num +) ;Select group
selsh=cm_ShrinkSelection               ;([Shift+]Num -) ;Unselect group
selex=cm_ExchangeSelection             ;([Shift+]Num *)
selcurex=cm_SelectCurrentExtension     ;(Alt+Num +)
selcurselu=cm_UnselectCurrentExtension ;(Alt+Num -)
selrest=cm_RestoreSelection            ;(Num /) ;Selection before last operation
selun=cm_ClearAll                      ;=524;Unselect all
showall=cm_SrcAllFiles                 ;=312;Source: All files
showexe=cm_SrcExecs                    ;=311;Source: Only programs
showtxt=em_ShowTXT
For more CM_ commands see TC folder\TOTALCMD.INC

EM_ command create in TC folder\usercmd.ini
[em_ShowTXT]
cmd=cd *.txt *.ini *.log *.reg


That commands also can be integrated into the TC menu. For a ready made one see:
Extended English Menus for Total Commander (by petermad)
DOWNLOAD from: http://www.totalcmd.net/authors/1223914.html
(Also you can learn many tricks from that download like that "cd *.txt" one)

- - -
Command line

All letters you type are redirected to the command line.
(Depends on "Configuration > Options... > Quick Search" setting)

By pressing ENTER you can execute the command line. Old command lines are saved in a history list. By pressing CTRL+Cursor down you can open this history list.

Choose an entry using the cursor keys up or down, then press the left or right cursor key to close the history list. You can press Shift+Del to remove a no longer wanted item from the history list.

In Configuration - Options - Misc., you can define alias commands to start often used programs and internal commands, e.g. np to open notepad.exe.

The "cd" command is handled internally to change the current directory in the active panel. If you give the name of a file, TC will place the cursor on that file

If the command line is turned off, it will be enabled automatically when typing in some characters.

The maximum length of the command line is limited to 2047 characters on Windows 2000, and 8191 characters on Windows XP (the maximum supported by these operating systems).

For a list of all function keys see Command line: keys
 
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Stefan2,
I would start aliases with some specific character or something similar to make sure that no tool or batch file with such name exists in my folders. But using aliases may be not too comfortable because of no suggestions. It would be nicer to have a filter with hints, e.g. when you type sel, list shows all commands starting with sel, so you can type more characters or just use cursor for selecting a command.
User avatar
nsp
Power Member
Power Member
Posts: 1805
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

you can even use ":" or ">" ... as prefix for such aliases !

2MVV - 2Ghisler brothers
Unfortunately aliases, cm_zzz em_xxx completion/(dynamic listing) is not implemented in command bar :( that could be great to have it for next version !
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

TC-Command-Executor.EXE

Post by *Stefan2 »

MVV wrote:Stefan2,
I would start aliases with some specific character
Yes, me too. I just wanted to show different possibilities and leave that to the user to modify.

- - -

In the mean time I have crafted a TC-Command-Executor.exe
which reads commands from a list (like TCfolder\TOTALCMD.INC)
and provide them as GUI to select and execute.


I just don't know how useful this is (for the issue mentioned in this thread it may work well)
and if it works in all conditions:


TC-Command-Executor.ini
[From file TCfolder\usercmd.ini

[em_ShowTXT]
em_ShowTXT;Usercmd.ini: cd *.txt *.ini


[From file TCfolder\TOTALCMD.INC
[________________Source________________]=0
cm_SpreadSelection=521;Select group
cm_ShrinkSelection=522;Unselect group
cm_ExchangeSelection=525
cm_SelectCurrentExtension=527
TC-Command-Executor.EXE
Select one and double click or press enter to execute:
em_ShowTXT | Usercmd.ini: cd *.txt *.ini
cm_SpreadSelection | 521 | Select group
cm_ShrinkSelection | 522 | Unselect group
cm_ExchangeSelection | 525
cm_SelectCurrentExtension | 527

-
I was even able to host a image   :wink:
Image: http://forentmp.lima-city.de/TC-Command-Executor.png


 
stridder
Junior Member
Junior Member
Posts: 4
Joined: 2015-05-25, 07:36 UTC

Re: How-to use ALIAS in command line, run internal commands

Post by *stridder »

Stefan2 wrote: 

Me think using ALIAS in command line is a good idea.

Configuration > Options... > Layout [X]Command line

Define Alias in gui "Configuration > Options... > Misc." or directly in TC folder\wincmd.ini

Code: Select all


[Alias]
sel=cm_SpreadSelection                 ;([Shift+]Num +) ;Select group
selsh=cm_ShrinkSelection               ;([Shift+]Num -) ;Unselect group
selex=cm_ExchangeSelection             ;([Shift+]Num *)
selcurex=cm_SelectCurrentExtension     ;(Alt+Num +)
selcurselu=cm_UnselectCurrentExtension ;(Alt+Num -)
selrest=cm_RestoreSelection            ;(Num /) ;Selection before last operation
selun=cm_ClearAll                      ;=524;Unselect all
showall=cm_SrcAllFiles                 ;=312;Source: All files
showexe=cm_SrcExecs                    ;=311;Source: Only programs
showtxt=em_ShowTXT
 
I created in TC folder\wincmd.ini with above text, but when I type "sel" and press Enter in TC command line it gives "File not found" error.
How can I check if TC found these aliases?
I never used aliases before, am I using it correctly?
User avatar
nsp
Power Member
Power Member
Posts: 1805
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: How-to use ALIAS in command line, run internal commands

Post by *nsp »

stridder wrote:.....
I created in TC folder\wincmd.ini with above text, but when I type "sel" and press Enter in TC command line it gives "File not found" error.
How can I check if TC found these aliases?
I never used aliases before, am I using it correctly?
To verify if an Alias is defined, you can go To Preferences -> Configuration -> Misc
select Alias Radio Buton and in the text field type your alias ex: sel
normally you should see the registerd command in the command field !


When you edit your wincmd.ini, the best way is to use %commander_ini% directly in the command bar !
stridder
Junior Member
Junior Member
Posts: 4
Joined: 2015-05-25, 07:36 UTC

Re: How-to use ALIAS in command line, run internal commands

Post by *stridder »

nsp wrote:
stridder wrote:.....
%commander_ini%[/color] directly in the command bar !
seems that I edited wrong file. used this advise and aliases work now, thank you.
Post Reply