Adobe Connect | Adobe Conect Custom Pods | AutoHotkey | Android | Arduino | Blog | COMM140 | Fractals | Grammar Checkers | Knots | a Million Dots | Processing | RedBubble | Tutorials | Weather | World Time Meeting Planner |
Home > Tutorials & Notes > Useful DOS Command Prompt Commands
1. Open up your command prompt by typing cmd in the run dialog box and hitting Enter.
2. Navigate to the directory which has the files and type the following command -
DIR /B /O:N > filename.txt
This will save all the filenames in the current directory to a text file. The text file will be saved in the same directory.
3. To save file names from any sub-directories in the current folder, just add /S like -
DIR /B /O:N /S > filename.txt
for /r %f in (*) do @copy "%f" .
Note that the trailing period in the command is significant… it designates the current folder as the destination for the copy operation.
Last refreshed: May 24 2017. 02:01.13 pm
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.