How to Get a List of Files from Command Prompt in Windows
Overview
When putting together a program that aggregates multiple sets of data, having too many files can be problematic. Naturally, every programming language has its own solutions, but temporary fixes often greatly assist when there is no need to repeat or when using a wide variety of languages. Let’s see how to do this quickly and easily using Windows Command Prompt.
Guide
Step 1. Copy the Address
Enter the folder where the file list is needed and copy the address. In Windows Explorer (and actually in Ubuntu Nautilus as well), pressing Ctrl+L
highlights the full address. Using the shortcut Ctrl+L
→ Ctrl+C
allows for quickly copying the address.
Step 2. CMD
In CMD,
cd (주소)
enter to navigate to the specified path.
Step 3.
In CMD,
dir /b
enter, then drag and copy to obtain the list of files.