This guide will show you how to list files inside of a directory with command line. This can be useful for many reasons. Something as simple as seeing what is in the directory so you can navigate through it. You might also want to verify if a file exists or not. To list the files and folders located in the folder or current directory, we will use the dir
command.
Here we will go through a very simple example. In this article I am assuming you are comfortable navigating to the directory that you would like to list the files.
- Navigate to the directory that you would like to list the files and folders for in command line. You can do this using the
cd
command. - Use the
dir
command to get a list of the files and folders available.
What commands are you using in Windows Command Line? Drop a comment below and maybe someone might learn a cool new command. I have found the best way to learn new tricks is from the experience of the peers that surround us!
If you would like to suggest a new article or video to be released, please reach out via the Contact Page. I look forward to hearing your feedback and providing content that is helpful for you!