How to print file names of all or select list of files in a folder to a list?
Suppose we have a lot of files in a folder and we want to get the names of the files in the folder, then we can easily get the names by using a simple DOS Command. If there are only a few, you could just type it or may be do "rename" and copy the file name. But if there are many files, the latter process is going to be a tedious task.
To get the file names of all files in folder or file names of just a select few types, do the following.
Here is a demo video:
To get the file names of all files in folder or file names of just a select few types, do the following.
Here is a demo video:
- Open Windows Explorer and navigate to the folder where the files are.
- Hold Left-Shift and right-click. Select "Open Command Prompt Here"
- A Command Prompt Window will appear and the path set to that directory.
- Type the following command, to print all the file names to a new file called "list.txt"
dir /w > list.txt
- To print only the file names of PDF documents in the folder, type
dir *.pdf /w >pdflist.txt
- You can apply other document extensions to filter as per the type of documents required. For example to get the list of all Microsoft Office Documents in the folder, type the command:
dir *.doc /w >documentslist.txt
No comments