The /L switch displays all names of files and folders as lowercase. When you display results this way, the Command Prompt does not show extra file information (file size and so on)-just the names of the files and directories. You can use the /D switch to display results in two columns instead of one.
The command will create a list of PDF files only. The command is: dir /s *.pdf >listpdf.txt
How to create a list of all the PDF files in a folder and its subfolders: The dir command allows the use of the wildcard symbol *, which adds very useful functionality. You may want a list of certain types of files such as pdf files. How to create a text file listing only certain types of files
For example: dir >D:\listmyfiles.txtĬould be used to place the list on an external drive D: Give the full pathname to create the file elsewhere.
The file “listoffiles.txt” will be created automatically in the working folder.