User:Yashikongo/sandbox

Examples dir Lists all files and directories in the directory that you are currently in. By default the dir command will list the files and directories in alphabetic order. dir *.exe The above command lists any file that ends with the .exe file extension. See the wildcard definition for further wildcard examples. dir *.txt *.doc The above is using multiple filespecs to list any files ending with .txt and .doc in one command. dir /ad List only the directories in the current directory. If you need to move into one of the directories listed use the cd command. dir /s Lists the files in the directory that you are in and all sub directories after that directory, if you are at root "C:\>" and type this command this will list to you every file and directory on the C: drive of the computer. dir /p If the directory has a lot of files and you cannot read all the files as they scroll by, you can use this command and it will display all files one page at a time. dir /w If you don't need the info on the date or time and other information on the files, you can use this command to list just the files and directories going horizontally, taking as little as space needed. dir /s /w /p This would list all the files and directories in the current directory and the sub directories after that, in wide format and one page at a time. dir /on List the files in alphabetical order by the names of the files. dir /o-n List the files in reverse alphabetical order by the names of the files. dir \ /s |find "i" |more A nice command to list all directories on the hard drive, one screen page at a time, and see the number of files in each directory and the amount of space each occupies. dir > myfile.txt Takes the output of dir and re-routes it to the file myfile.txt instead of outputting it to the screen