Listing Files and Directories

The lst command allows you to list files and directories. The syntax of lst command is as follows:

lst [<dir_path> | -t [<dir_path>] | -drv]

The "dir_path" is the path to the directory of which you want to list files and directories. If you don't specify the "dir_path", files and directories of the current directory will be listed.

Listing Files and Directories - FireCMD

The above snapshot shows the output of lst command. The first column contains the names of files and directories. Keeping the Alt key pressed and then clicking on the file or directory name opens the respective file or directory.

The second column shows the size of files (in bytes). In case of directories, a '-' is shown instead of the size.

The third column shows the type and permissions associated with each file and directory. The first character tells whether the item is a directory or a file. The d indicates that the item is a directory. A '-' at the same position indicates that it is not a directory (i.e. it is a file). You then see a series of characters that can take the values r, w, x, h and l. Below is a table showing the meaning of each character. A '-' in place of any character indicates that the file/directory does not have that permisssion or is not of that type.

CharacterIndicates
dIt is a directory (Folder).
rFile/Directory has read permission.
wFile/Directory has write permission.
xFile/Directory is executable. Usually the directories always have execute permission. Execute permission on a directory means you can list the files in that directory.
hFile/Directory is hidden.
lIt is a link (shortcut). Mostly, the files with extension ".lnk" are links.

Checking the Creation, Last Access and Last Modified Date and Time

You can view the creation, last access and last modified time of files and directories using the syntax as follows:

lst -t [<dir_path>]

Listing Files and Directories with Time Information - FireCMD

Listing Drives

You can view all drives currently attached to your system using the following syntax:

lst -drv

 Listing Drives - FireCMD

You can open a particular drive by keeping the Alt key pressed and then clicking on the drive name.

Using Wildcard Characters

A wildcard character is a special character that represents one or more other characters. An * (asterisk) represents zero or more characters and ? (question mark) represents any one character. You can use these wildcard characters to easily project only the files and directories whose names meets your criteria.

lst with Wild Card Characters - FireCMD

In the above image, the first command i.e. lst C:\*.txt lists files in C:\ drive having the ".txt" extension. The second command lst C:\a* lists all files and directories whose names are starting with a. The third command lst C:\????.* only lists the files having the name of four characters in length.


Documentation Index Page