Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account

List Files In Directory

  • Please log in to reply




  • Member
  • PipPip
  • 36 posts
I have a folder that contains 222 folders within it. I need a program, or some other method, of creating a list of those folders. I do not wish to print the list. It only has to scan the one directory and I do not need the names of the files in the subdirectories. I would like this because I have 222 programs installed to my external hard drive and they are portable. I want to list all of these apps without actually typing each name individually.
  • 0




    Visiting Staff

  • Visiting Consultant
  • 142 posts
This batch file should work. It will create a list of the folders in folderlist.txt and then open it in notepad.

dir /a:d /b "Full path to folder"> folderlist.txt
notepad folderlist.txt

So if the folder you wanted to look in was C:\program files, then you would use this batch file:

dir /a:d /b "C:\program files"> folderlist.txt
notepad folderlist.txt

In order to create and run a batch file:

  • Open a new notepad window (Start>All Programs>Accessories>Notepad)
  • Copy & paste the contents of the following codebox into the notepad window
    insert text of batch file here
  • Click File > Save as
  • In the box labelled File name copy and paste cleanup.bat
  • Change Save as type to All Files
  • Save it to your desktop
  • Close the notepad window
  • Double click on cleanup.bat
  • A DOS window will come up briefly and then disappear, this is normal

  • 0

Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP