How to list all files of a certain type
Have you ever wanted to have a list of all the MP3 files in a certain folder or for that matter on your whole computer? Or a list of all the photos with extension JPG? Or of all the Microsoft Office DOC files? I have written a script that makes this very simple. It can be downloaded here. Unzip the single file to anywhere convenient and click. It is a VBScript so you will get the standard warning. The script does not change anything on the system and can simply be deleted if you don’t want it. It makes a text list of a selected file type and puts the list wherever you want.
If you’d rather skip the script and want to do it yourself, you can use the command line in Windows. It uses the “dir” command. Old-timers may remember something similar from DOS but this is a full-fledged 32-bit command. It has a number of switches that allow for a variety of options. Information about the switches can be obtained by entering dir /? in the command line. The simple command dir entered into a command window will list the files and subfolders that are in the present working folder and show the list on the screen. To list the contents of a different folder, you have to enter the complete path. An example might be dir “C:\my folder”. To obtain a list of just those files with a particular extension ext, the command is dir “C:\my folder\*.ext”. The parentheses are necessary because of spaces in the folder name and possibly in file names. You can obtain a list of the files in all the subfolders as well by adding the switch /s as in dir “C:\my folder\*.ext” /s. To get this list into a text file C:\list.txt add a redirection so that finally the command becomes dir “C:\my folder\*.ext” /s /q > C:\list.txt.
Maybe you should consider that script after all.
Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.
Comments
Joel, I thank you for the kind words. I have put the script on my Website at http://vlaurie.com/computers2/Articles/script.htm but I doubt many people will see it. I am open to suggestions from anyone as to a possible forum.
Sorry, the comment form is closed at this time.

That .vbs script is a nice piece of work. I looked at the code — you put a lot of work into that. Can you publish it somewhere where more people will find it?