When there is a situation in Windows, there has to be some solution using PowerShell. So Once again I’ve something useful for you.


A folder in my Hard disk has about 300 movies and I want to share this list of movie names with my friend, or I want to compare my list with one of my friend’s collection of movies on his hard disk.


Below script will work in above situation, you just need to change few parameters in the script:

First highlighted parameter is the Directory of the folder, where you want the script to search for movie files, and the second highlighted one is the location of the output file to be placed with name Movielist.txt like below.

File list captured with PowerShell

If you want to compare two folders for files that aren’t common, for example – I want to compare movies in my laptop with movies in my friends Hard Disk, just add the following script in the above script and modify the highlighted location with the directory to be compared.

Your output will look something like this :

Comparing Files with PowerShell

Happy Learning! 🙂