Here's a comprehensive list of dir command options along with their descriptions:
/a: Sorts the output by attributes, including name, extension, size, date, and time. You can specify the sorting order by following the /a option with a letter:
a: Sorts by name in ascending order.
d: Sorts by date in descending order.
n: Sorts by name in descending order.
s: Sorts by size in ascending order.
t: Sorts by time in descending order.
/b: Displays a bare list of filenames without any headers or summary information.
/c: Displays the compression ratio of files compressed using DBLSPACE. This option is available with DOS Version 6.
/d: Displays the files and folders in four-column format, similar to the directory view in File Explorer.
/e: Sorts the output by extension.
/l: Displays the full path of each file or folder.
/n: Displays the owner of each file or folder.
/o: Sorts the output by various columns, such as name, extension, size, date, and time. You can specify the sorting order by following the /o option with a letter:
n: Sorts by name.
e: Sorts by extension.
s: Sorts by size.
d: Sorts by date.
t: Sorts by time.
/p: Pauses the output when the screen is full. Press any key to continue to the next page.
/q: Displays the file attributes of each file or folder.
/r: Displays alternate data streams.
/s: Recursively lists the contents of the current directory and all subdirectories.
/t: Sorts the output by various timestamps, such as creation, last access, and last modification. You can specify the sorting order by following the /t option with a letter:
c: Sorts by creation time.
a: Sorts by last access time.
m: Sorts by last modification time.
/w: Displays the files and folders in wide format, similar to the directory view in File Explorer.
/x: Displays the short filenames for files with long filenames.
Note that these options are case-insensitive. You can combine these options to achieve more specific results. For instance, to list all files with the ".txt" extension and their full paths, use dir *.txt /n.
To explore the full range of options and their usage, type dir /? in the Command Prompt. This will display the detailed help information for the dir command, providing extensive guidance on its various functionalities.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.