Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to export the list of files in a folder exported to a text file?

Posted on 2012-03-10
3
Medium Priority
?
320 Views
Last Modified: 2012-04-14
I want to print out a list of files in a folder in to a text file, so can print the list for my an inventry record of my files.  How do I do that?
0
Comment
Question by:shyam1944
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 58

Expert Comment

by:Bill Prew
ID: 37706019
If you want the files plus their size and date information just do:

DIR c:\dirname\*.* > "c:\save\log.txt"

If you want just a bare list of the file names then you can do:

DIR /b c:\dirname\*.* > "c:\save\log.txt"

These will list all files in the c:\dirname folder, and save the results to the "c:\save\log.txt" file.  Naturally, change the names as needed.

This command could be executed at a DOS command prompt,or in a BAT file.

To see other options on the DIR command you can do:

DIR /?

~bp
0
 
LVL 70

Accepted Solution

by:
garycase earned 2000 total points
ID: 37706207
While you can, as noted above, do this with a simple command line entry with the output directed to a text file (or printer) ,  you'll get FAR more flexibility by using a small utility designed to format and print directories.

This is a very nice free one:  http://www.karenware.com/powertools/ptdirprn.asp

... or you can look at Glenn Alcott's "Directory Printer" [Not free, but it adds a few features Karen's doesn't have]  http://www.galcott.com/index.htm
0
 
LVL 11

Expert Comment

by:paultomasi
ID: 37706397
In it's simplest form, shyam1944 needs:

    DIR /B >filename

where filename is the name of the output file. This will create a list of files in the current folder.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows 10 Creator Update has just been released and I have it working very well on my laptop. Read below for issues, fixes and ideas.
Know the reasons and solutions to move/import EDB to New Exchange Server. Also, find out how to recover an Exchange .edb file and to restore the file back.
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question