computer help index
 
 
Search:
"Offering free computer help, hints, and tips to the Internet populace." Now with over 3,490 tips!

Windows XP and DOS

Display a Directory List Without Header or File Information

SUMMARY: Display a barebones list of files in a directory without the volume name, serial number, bytes free, and other information.

When writing a DOS batch file in Windows XP, have you ever needed to acquire the list of files in the current directory without all of the header information (volume name and serial number), footer information (number of files and/or directories, bytes used and free), or extra file information (date and time, file type, and file size)?

The /b parameter, when added to the dir command, displays a "bare" directory listing, only providing a list of files and/or directories with no extraneous information.

The following command displays all files and subdirectories in the current directory:

dir /b

For just a list of files:

dir /b /a-d

For just a list of subdirectories:

dir /b /ad

Like many other DOS commands the results can be piped to an external file, if desired. For example:

dir /b /ad > list_of_directories.txt

 

 
Add: Del.icio.us | Digg | Furl | My Yahoo!
 

Discuss This Tip

Print This Tip

Get E-Mail When New Tips are Online

Return to the Windows XP and DOS page.


More in MalekTips:
PuttyMozilla Firefox - Plugins and ExtensionsGoogle Gmail



Display System Menu with Alt key[MODIFIED] View Pages Rendered in Firefox and Internet ExplorerMove the Chat or Labels Section to the Right

RSS Feeds - Subscribe!
 

You want the latest tech tips and tricks in your e-mail Inbox - FREE? Type your e-mail address below and click 'Subscribe'.
 



( sample / details ) ( opt-out instructions )
 


 Free Offer! - Subscribe to the MalekTips computer help list and be one of the first to get new computer tips, articles, and download links! ( privacy policy )  ( opt-out instructions )
This page and its contents are copyright
©1997 - 2008 Envision Programming. ( copyright/disclaimer )

Home | Free Computer Help Newsletter! | Windows | Web Development | DOS and Batch Files | Removing Spyware
Digital Camera and Photography | Computer and Internet | Software | Microsoft Word
Computer Articles | About | Contribute a Tip | Link To Us! | Computer and Technology Links
RSS Feeds |  Contact Us | Advertising | Privacy Policy | Computer Help Forums