

You have to press a key to continue viewing the next page of results.

You can use the /P switch to have the Command Prompt pause the results after it displays each screen. Some directories have hundreds or thousands of files. So, for example, you could use the following command to sort results by time and date, with older entries appearing first:ĭir /O-D Display Results One Page at a Time S: Sorts by file size, smallest to largest.

N: Sorts by the name of file/folder in alphabetical order.G: Sorts by listing folders first, then files.E: Sorts by file extension in alphabetical order.You can use the /O switch followed by a letter code to display directory results sorted in various ways. Now, you can use it along with a “-” (minus) to have filenames displayed on the far left instead. The /N switch used to be used to achieve this effect. dir /L Display Filename Results on the Far Rightīy default, the Command Prompt displays the names of files to the far right. The /L switch displays all names of files and folders as lowercase. When you display results this way, the Command Prompt does not show extra file information (file size and so on)-just the names of the files and directories. You can use the /D switch to display results in two columns instead of one.
