Alik Levin's

Clarity, Technology, and Solving Problems | PracticeThis.com

Use DIR Command To Generate List Of Files And Store It In File

Use DIR Command To Generate List Of Files And Store It In File

  • Comments 2
DIR /S /B /A:-D
I use simple DIR command to generate file lists. It serves me in many scenarios. For example, I use it to generate .Net assemblies list when I conduct preliminary scan as part of code inspection process. Here are the explanations to the switches:
  • /S - search sub folders
  • /B - bare format, no summaries and headings
  • /A:-D - no directories, files only

To save generated list of files into text file simply add >C:\myfileslist.txt. The resulting command would look as follows:

DIR /S /B /A:-D *.DLL >C:\myfileslist.txt

My related posts:

  • Here's a reghack to add this ListFolder option to your Explorer. Copy and save as a .reg file or add it manually.  Works on XP or Vista.  Change the Dir options as needed....enjoy.

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\Folder\shell\ListFolder\Command]

    @="cmd.exe /c dir /a/ogen/-p \"%1\">c:\\dir.txt & notepad.exe c:\\dir.txt &"

  • Jason! This is super cool!!

    Thanks

Page 1 of 1 (2 items)