how to output a list of files within a folder (windows)

the problem:
i have a folder with lots of files in them, and need a list of filenames that can be edited using a text editor, excel or word.

the solution:
this is pretty simple in windows: just open notepad or your favourite text editor, copy&paste the following code:

dir /a /b /-p /o:gen >filelist.txt
…and “save as” a .bat file, e.g. filelist.bat (make sure it’s not .bat.txt!).
now, if you execute that file (double-click or enter), it creates a textfile named “filelist.txt” in the same directory.

code via theeldergeek

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.