Five Windows DIR Command Flags That Make File Searches Faster
The Windows DIR command, run in Command Prompt, lists files and folders in the current directory along with their size and last write time. Several switches extend its usefulness beyond basic listing: /a reveals hidden and system files, while /s recursively searches through subfolders using a filename pattern. The /b flag outputs bare filenames with no headers, making it ideal for piping results into scripts, and /o: allows sorting by name, date, or size without touching a mouse. Combining flags — such as dir /b /s /o:-d *.dll — lets users retrieve targeted, sorted file lists in a single command. Microsoft's official DIR reference on Microsoft Learn provides the complete list of available parameters for deeper exploration.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in