Solved

how to list the names of all files in a directory to a text file

Posted on 2011-03-12
5
204 Views
Last Modified: 2012-05-11
I have thousands of files in a directory and now I have to list all their names into a text file.
what is the best way to do this. btw, it would be better if each file name started on a new line.

thanks
0
Comment
Question by:MichaelGlancy
  • 2
  • 2
5 Comments
 
LVL 5

Accepted Solution

by:
ewkelly earned 500 total points
ID: 35116697
Open a command prompt and type in  dir c:\thefoldername\*.*  >> filelist.txt
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 35116728
Here's a fancy version of Print Folder http://no-nonsense-software.com/printfolder/  but there is a free version that I use too.  And here's a method from Microsoft: http://support.microsoft.com/kb/321379
0
 

Author Comment

by:MichaelGlancy
ID: 35116780
where is  filelist.txt  created ?
0
 

Author Comment

by:MichaelGlancy
ID: 35116785
found it

can I do this without having the creation time and date and file size printed ?
0
 
LVL 5

Expert Comment

by:ewkelly
ID: 35116929
Don't think so.
If you type dir /? you will see all of the options.

What I would do is import it into a spreadsheet and delete the columns you do not want.
0

Featured Post

Want to promote your upcoming event?

Are you going to an event? Are you going to be exhibiting at a tradeshow? Talking at a conference? Using a promotional banner in your email signature ensures that your organization’s most important contacts stay in the know and can potentially spread the word about the event.

Join & Write a Comment

The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now