I recently had to come up with a list of file names in a folder. Trying to highlight and copy and paste each text file name is way too time consuming. Instead, I used the command line in Windows to copy all the file names and output them into one text file. Here’s a step by step on how to do that:
1. Click on the Start button and click Run (or if Vista or Win 7 user, press the Windows button and R button at the same time). A Run dialogue box will pop up.
2. In the Run box type “cmd”.
3. Now type “dir” to see which directory in your computer you are located. If you want another drive letter type the drive letter after the prompt, like this “d: “(* if you are not sure of the drive letter you can find it under My Computer, to go to another server/network, make sure it is mapped/mounted to your computer).
4. Now, to get to the folder with all the files, type” cd (name of directory)”. To move up a directory, just type “cd..”. To see all of the file names in that folder/directory type “dir”.
5. Once you have found the folder with the file names you want to copy, type “dir /b >filename.txt”. Filename will be what you want to call the text document with all the file names.
6. Now the text file will be saved in the same directory you just copied all the file names from.
I hope this helps!
Thanks a ton! This was a huge help!
Oh Great. Thanks a lot
Here are 8 simple steps:
1.Go to your Start menu and choose the Run item or simply type in the word “run” (NO QUOTATION MARKS) (for new computer users, the Start menu is the button usually in the lower left hand corner that you click to see all your programs or shut down your computer in windows)
2. In the prompt, type “cmd” (NO QUOTATION MARKS) and hit Enter
3. Type “cd ” and a space but do NOT hit Enter (NO QUOTATION MARKS)
4. Now, in My Computer, navigate to the folder you want.
5. Using your mouse, click on and Drag that folder into the CMD window. Remember, just drag the folder and do not open the folder to show the content. Just the folder! Now hit Enter. Don’t worry, the folder won’t go anywhere: this is just an easy way of changing to the directory you want without having to type it!)
6.Now type “Dir” and hit Enter. This will list the content of the directory for you. (NO QUOTATION MARKS)
7.Now to get this into a copy/paste text list simply type: “dir/b >filenames.txt” and hit enter. You can pick any title you want after the > symbol but filenames is good for this example for the name of the text document with all the file names.
8. Now go to My Computer open the folder that you wanted a list of files and you will see a file (filenames.txt) and you can then open it and it will have a list of all the songs or documents you wanted that you can then copy and paste into a word document, excel spreadsheet, or email.
This works super fast.
OMG AMAZING YOU ROCK MY WORLD. SO MUCH EASIER!
Thanks so much! You saved my afternoon!
thank you
Wow this really works thanks for saving my time….
It is very helpful
Thank U,
Wow ..it’s really good .. very help full….. thanks a lot…
Thank you – you just saved me big time!!!!!!!!