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

[posted: ]  [0 comments]

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

Be Sociable, Share!
    [category: computers & technology] [tags: , , ]

    Leave a Reply