Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works

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