

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.
