Please enable JavaScript to view this site.

Take Command / TCC Help v. 29

PurposeDisplay a text file, with forward and backward paging and scrolling


FormatLIST [range...] [/= /8 /A:[[-|+]rhsadecijopt /B[-]n /C /Etext" /F /H /I /L[-]n /N /O:[-]acdeginorstuz /R /S /T"text" /U /W /X[s]] [@file] [file...]


file        A file or list of files to display.
@file        A text file containing the names of the files to view, one per line (see @file lists for details).
range        A file selection range (date, description, exclusion, size, time)



See also: VIEW, HEAD, TAIL, and TYPE.


File Selection


Supports command dialog, attribute switches, extended wildcards, ranges, multiple file names, and include lists.




Can be used with FTP/HTTP Servers.




See the VIEW command for an updated and enhanced LIST replacement.


LIST provides a fast and flexible way to view a file, without the overhead of loading and using a text editor.


For example, to display a file called MEMO.DOC:


list memo.doc


Note: LIST is primarily intended for displaying the contents of ASCII and Unicode text files (i.e. alphanumeric characters arranged in lines separated by CR/LF). It can be used for other files which contain non-alphabetic characters or unusual line separators, but you may need to use hexadecimal mode (see below) to display or search these files. Lines longer than 32,767 characters will be truncated unless you're in Wrap or Hex modes.


LIST displays files in the TCC window. If you resize the TCC window or the Take Command window when TCC is running in a tab window, LIST will automatically resize its display.


You can define all of the LIST keys using the OPTION / Keyboard dialog.


DirectiveDefault        Description


ListBackB        Return to the previous file.
ListClipboardCtrl-B        Copy the current filename to the clipboard.
ListContinueC        Continue with the next file.
ListDeleteDel        Delete the current file.
ListDownDown        Scroll down one row.
ListEditE        Edit the file with the editor associated with that filetype. If there is no association, LIST will use the editor defined in the Editor configuration option. If no editor is defined, LIST will use Notepad. If LIST is displaying a pipe, the contents are saved to the clipboard and the editor is started. (You will need to manually paste the clipboard contents.)
ListEndEnd        Go to the end of the file.
ListExitEsc        Exit the current file.
ListFindF        Prompt and search for a string or a sequence of hexadecimal values.
ListFindPreviousCtrl-N        Find previous matching string in the file.
ListFindRegexR        Prompt and search for a regular expression.
ListFindRegexReverse Ctrl-R        Search backwards for a regular expression.
ListFindReverseCtrl-F        Prompt and search for a string, searching backward from the end of the file.
ListGoto G        Display a dialog to jump to a specific line.
ListHelpF1        Display help for LIST.
ListHexX        Toggle the hex mode (/X) option.
ListHexSpaceS        Toggle display of nonprintable characters (space or .) when in hex mode.
ListHighBitH        Toggle the "strip high bit" (/H) option.
ListHomeHome        Go to the beginning of the file.
ListInfo I        Displays information about the current file.
ListLeftLeft        Scroll left one column.
ListNextN        Find next matching string.
ListNumberL        Number the lines.
ListOpenO        Display the "Open File" dialog.
ListPageLeft Ctrl-Left        Scroll left 40 columns.
ListPageRight Ctrl-Right        Scroll right 40 columns.
ListPgUpPgUp        Scroll up one page.
ListPgDnPgDn        Scroll down one page.
ListPrintP        Print all or part of the file (displays the Windows "Print" dialog).
ListRefreshF5        Refresh the display.
ListRightRight        Scroll right one column.
ListSave Ins        Save to a file.
ListTabSizeTab        Display a dialog to set the tab size.
ListUnicodeU        Toggle the Unicode display mode.
ListUpUp        Scroll up one row.
ListWrapW        Toggle the "line wrap" (/W) option.


Text searches performed with F, N, Ctrl-F, and Ctrl-N are not case-sensitive unless you check the Match case box in the search dialog. LIST remembers the search strings you have used in the current session; to select a previous string, use the drop-down arrow to the right of the string entry field (the N key and the Next button search for the top item in this drop-down list).


When the search string is found LIST displays the line containing the string at the top of the window, and highlights the string it found. Any additional occurrences of the string on the same display page are also highlighted. Highlighting is intended for use with text files. In binary files, the search string will be found but may not be highlighted properly.


If the display is currently in hexadecimal mode and you press F or Ctrl-F, you will be prompted for whether you want to search in hexadecimal mode. If so, you should then enter the search string as a sequence of 2-digit hexadecimal numbers separated by spaces, for example 41 63 65 (ASCII values for the string "Ace"). Hexadecimal searches are case-sensitive, and search for exactly the string you enter.


LIST saves the search string used by F, N, Ctrl-F, and Ctrl-N so you can LIST multiple files and search for the same string simply by pressing N in each file, or repeat your search the next time you use LIST.


You can use extended wildcards in the search string. For example, you can search for the string to*day to find the next line which contains the word to followed by the word day later on the same line, or search for the numbers 101 or 401 with the search string [14]01. If you begin the search string with a back-quote `, or enclose it in back-quotes, wildcard characters in the string will be treated as normal text with no special wildcard meaning.


You can use the /T switch to specify search text for the first file. When you do so, LIST begins a search as soon as the file is loaded. Use /I to ignore wildcards in the initial search string, and /R to make the initial search go backwards from the end of the file. When you LIST multiple files with a single LIST command, these switches affect only the first file; they are ignored for the second and subsequent files.

You can also search using Regular Expressions using the R and Ctrl-R keys. See Regular Expression Syntax for supported expressions.


You can use the G key to go to a specific line number in the file (or to a specified hexadecimal offset in hex mode). LIST numbers lines beginning with 1. A new line is counted for every CR or LF character (LIST determines automatically which character is used for line breaks in each file), or when line length reaches 32,767 characters, whichever comes first.


LIST normally allows long lines in the file to extend past the right edge of the screen. You can use the horizontal scrolling keys (see above) to view text that extends beyond the screen width. If you use the W command or /W switch to wrap the display, each line is wrapped when it reaches the right edge of the screen, and the horizontal scrolling keys are disabled.


To view output from another command simply pipe the output of the command to LIST, for example:


dir | list


Normally LIST will detect input from a pipe automatically, but if it does not, use /S to explicitly specify piped input. Your ability to navigate backward through the displayed output (e.g. with PgUp) may be limited when viewing a very large amount of data through a pipe, due to the way Windows handles piped output.


To view text from the clipboard, use CLIP: as the file to be listed. CLIP: will not return any data unless the clipboard contains text. See Redirection for more information on CLIP:.


If you print the file which LIST is displaying, the print format will match the display format. If you have switched to hexadecimal or wrapped mode, that mode will be used for the printed output as well. If you print in wrapped mode, long lines will be wrapped at the width of the display. If you print in normal display mode without line wrap, long lines will be wrapped or truncated by the printer, not by LIST. Regardless of the display mode, LIST will bring up a standard Windows print dialog which allows you to print selected text, the current page, or the entire file.




LIST can display files on FTP servers as well as the contents of HTTP/HTTPS URLs. For example:





You can also use the IFTP command to start an FTP session on a server, and then use an abbreviated syntax to specify the files and directories you want. For more information, see Using FTP/HTTP Servers and IFTP.


NTFS File Streams


LIST supports file streams on NTFS drives. You can list an individual stream by specifying the stream name, for example:


list streamfile:s1


If no stream name is specified the file's primary data is displayed.


See NTFS File Streams for additional details.


Advanced Features


If you specify a directory name instead of a filename as a parameter, LIST will display each of the files in that directory.


If no filename is specified (and stdin is not redirected),  LIST will open the common Windows "open file" dialog.


Most of the LIST keystrokes can be reassigned with key mapping directives.


By default, LIST sets tab stops every 8 columns. You can change this behavior with the Tabs Width configuration option.




/=Display the LIST command dialog to help you set the filename and command line options. The /= option can be anywhere on the line; additional options will set the appropriate fields in the command dialog.


/8The file is interpreted as UTF-8.


/A:Select only those files that have the specified attribute(s) set. See Attribute Switches for information on the attributes which can follow /A:. Do not use /A: with @file lists. See @file lists for details.


You can specify /A:= to display a dialog to help you set individual attributes.


/B[-]nStart at byte n. If n is preceded by a minus sign -, start n bytes from the end of the file. The /B option will only display the file from the offset to the end; you cannot go back to a point before the offset.


/CDisplay the file in a separate screen buffer and restore the original buffer upon exiting LIST. /C only works in stand-alone TCC windows, not in Take Command tab windows.


/ESearch for a regular expression in the first file. This option is the same as pressing R, but it allows you to specify the search text on the command line. The regular expression must be contained in double quotes if it contains spaces, punctuation, or wildcard characters. See also /T.


/FDisplay the contents of the console screen buffer.


/HStrip the high bit from each character before displaying. This is useful when displaying files created by some word processors that turn on the high bit for formatting purposes. You can toggle this option on and off from within LIST with the H key or the tool bar.


/IOnly meaningful when used in conjunction with the /T "text" option. Directs LIST to interpret characters such as *, ?, [, and ] as literal characters instead of wildcard characters. /I affects only the initial search started by /T, not subsequent searches started from within LIST.


/I"text"Select files by matching text in their descriptions. See Description Ranges for details.


/L[-]nStart at line n. If n is preceded by a minus sign -, start -n lines from the end of the file. The /L option only affects the initial page display; it does not prevent you from subsequently scrolling back to the start of the file.


/NDisplay line numbers. You can toggle the line numbers with the L key.


/O:...Sort the files before processing.


You may use any combination of the sorting options below. If multiple options are used, the listing will be sorted with the first sort option as the primary key, the next as the secondary key, and so on:


nSort by filename and extension, unless e is explicitly included. This is the default.
-Reverse the sort order for the next sort key
aSort names and extensions in standard ASCII order, instead of numerically when numeric substrings are included in the name or extension.
cSort by compression ratio
dSort by date and time (oldest first); also see /T:acw
eSort by extension
gGroup subdirectories first, then files
iSort by description
oSort by owner
rReverse the sort order for all options
sSort by size
tSame as d
zSame as s


/ROnly meaningful when used in conjunction with the /T "text" option. Directs LIST to search for text from the end of the file instead of from the beginning of the file. Using this switch can speed up searches for text that is normally near the end of the file, such as a signature. /R affects only the initial search started by /T, not subsequent searches started from within LIST.


/SRead from standard input rather than a file. This allows you to redirect command output and view it with LIST. Normally, LIST will detect input from a redirected command and adjust automatically. However, you may find circumstances when /S is required. For example, to use LIST to display the output of DIR you could use either of these commands:


 dir | list

 dir | list /s


/TSearch for text in the first file. This option is the same as pressing F, but it allows you to specify the search text on the command line. The text must be contained in double quotes if it contains spaces, punctuation, or wildcard characters. For example, to search for the string TC in the file README.DOC, you can use this command:


 list /t"Take Command" readme.doc


The search text may include wildcards and extended wildcards. For example, to search for the words Hello and John on the same line in the file LETTER.DAT:


list /t"Hello*John" letter.dat


When you display multiple files with a single LIST command, /T only initiates a search in the first file. It is ignored for the second and subsequent files. See also: /I and /R.


/UDisplay a ruler on the second line.


/WWrap the text at the right edge of the screen. This option is useful when displaying files that don't have a carriage return at the end of each line. The horizontal scrolling keys do not work when the display is wrapped. You can toggle this option on and off from within LIST with the W key or the Wrap button on the tool bar.


/XDisplay the file in hexadecimal (hex) mode. This option is useful when displaying executable files and other files that contain non-text characters. Each byte of the file is shown as a pair of hex characters. The corresponding text is displayed to the right of each line of hexadecimal data. You can toggle this mode on and off from within LIST with the X key or the heX button on the tool bar.


You can display spaces rather than periods for non-printable characters by specifying the /XS option. You can also toggle between spaces and periods with the S key while displaying a file in hex mode.