Selecting files

From TotalcmdWiki
Jump to: navigation, search

Selecting files

To select files, simply click on them with your mouse or move to them with the cursor keys and press [insert] or [space bar]. If you have chosen to use the right mouse button in the configuration dialog, your left mouse button just moves the cursor. You have to use the right mouse button for selecting items.

If you select a directory using the [space bar], the total amount of space used by this directory is shown. You can suppress this behavior by unselecting " Calculate space occupied by subdirectories: when selecting with the space bar" in the Options Dialog.

Select multiple consecutive files

Click on the first file to be selected with the left mouse button, press and hold down the [Shift] key and click on the last file you want to select.

With the right mouse button selected in the configuration dialog, you can click and drag over the files you want to select without using the [Shift]key.

With the keyboard you can select files with [Shift] + [Up/Down] keys. To select (or deselect if they are already selected) all files from cursor position to the first/last file you may use [Shift]+[Home/End].


Select multiple not consecutive files

Click on the first file to be selected with the left mouse button, press and hold down the [Ctrl] key and click on the next file you want to select. Continue until all desired files are selected. If you accidently select a file you can deselect it by [Ctrl] Clicking once again on this file.


With the right mouse button selected in the configuration dialog, you do not need to use the [Ctrl] key. Rightclick on the files you want to select and the selection will remain if you select other files. To deselect an accidently selected file just click again on the file.

With keyboard you may navigate with the cursor keys and select the files by holding the [Shift] key while moving off the file with [Up/down]. You may also press [insert] or [space bar] to select or deselect the files.

Advanced file selection

There are a few advanced commads to select files. Most of them can be accessed by a Hotkey on the Numeric Keypad on the right side of your Keyboard (if you do not use a Notebook). Those keys will be called as e.g. [Num+] for the [+] key on the Numeric field. These commands also can be accessed by one of the internal commands of TC using a button or a User defined Command. You can use these commadns too to define different hotkeys in Options:Misc

Select / unselect files of special types

Depending on the settings this command selects or deselects either files or files and folders.

Press [NUM+] (or [NUM-]) or select one of the selection options (Select/Unselect group) from the menu Mark. Then type the desired file type (for example *.txt). You can also specify multiple file types, and even file types, which should not be selected! These must be separated by the pipe symbol |. This symbol is used because it isn't a valid character for file names.

Example 1: w*.*|*.bak *.old selects all files, which start with w and do not end with .bak or .old.

Example 2: |*.exe selects all files except for programs.

Alternatively, you can select a predefined filter, which can be defined in this dialog box through the 'define' button. This filter allows the same options as the search function!

New: You can now also use regular expressions. They need to be started with a "<" character, to distinguish them from normal search strings.

The internal command is cm_SpreadSelection.

Select all / no files

Depending on the settings this command selects or deselects either files or files and folders.


Press [Ctrl] and [NUM+] (or [NUM-]) or choose Select all/Unselect all from the menu Mark

You can also use [Ctrl]+[A] to select all files.

The internal commands are cm_SelectAll and cm_ClearAll.

Select all files of the same type

Depending on the settings this command selects or deselects either files or files and folders.

To select all files of the same type (i.e. same extension) you can press [Alt]+[Num+]. For deselection you have to use [Alt]+[Num-]

The internal commands are cm_SelectCurrentExtension and cm_UnselectCurrentExtension.

Invert selection

Depending on the settings this command selects or deselects either files or files and folders.

With [Num*] you will select all files in the source directory which were not selected and deselect the previously selected files. This is especially useful after comparing directories.

The internal command is cm_ExchangeSelection.

Restore Selection

[Num/] restores the selection which was active before the last file operation.

The internal command is cm_RestoreSelection

Save selection

Saves the current selection internally. It can be restored with the next menu item. On every file operation, the current selection is saved automatically. The selection is not saved at the Clipboard.

The internal command is cm_SaveSelection.


Save selection to file

Saves the current selection to a plain text file.

The internal command is cm_SaveSelectionToFile.


Load selection from file

Restores the selection from a plain text file.

The internal command is cm_LoadSelectionFromFile.

Load selection from Clipboard

Restores the selection from the ClipBoard. This could be used with another internal command cm_CopyNamesToClip.

The internal command is cm_LoadSelectionFromClipBoard.



Special Setting

Space Bar

If you press [space bar] per default the cursor remains on it's current position. If you want the cursor to move to the next file (as with pressing [Insert]), you'll have to add the following entry to the Wincmd.ini:

[Configuration]
SpaceMovesDown=1

Folder

You can set in the Configuration Dialog at Operation) if to select only files or files and folders with some of the Advanced File Selections.



Back to List of internal functions