Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Command Line Prompt - How To Export List of Files to Text File

08 Jan 2012   #1

Windows 7 Home Premium SP1 64bit
 
 
Command Line Prompt - How To Export List of Files to Text File

Hi guys,

I have a folder with 995 files in it and I'd like to give someone a text file with a list of all these files in it. Is there a way that I can get the command line to send the names of these files to a text file?

I tried navigating to the directory and using the DIR command and, sure enough it gives me a list but I am unable to copy and paste it to a textfile myself for some reason.

Any help would be appreciated.


My System SpecsSystem Spec
.

08 Jan 2012   #2

Windows 7 Ultimate (x64)
 
 

type this:

DIR > dir.txt

This should save the output of DIR into the text file dir.txt
My System SpecsSystem Spec
08 Jan 2012   #3

Windows 7 Home Premium SP1 64bit
 
 

Quote   Quote: Originally Posted by unifex View Post
type this:

DIR > dir.txt

This should save the output of DIR into the text file dir.txt
Thanks for the help. Got it working now!!
My System SpecsSystem Spec
.


08 Jan 2012   #4

Windows 8.1 Pro RTM x64
 
 

Try Dir "C:\Users\user\Unsorted\Guitar Tab\PDF files" > "C:\Users\user\Desktop\dir.txt"
My System SpecsSystem Spec
08 Jan 2012   #5

Windows 7 Home Premium SP1 64bit
 
 

Quote   Quote: Originally Posted by Dwarf View Post
Try Dir "C:\Users\user\Unsorted\Guitar Tab\PDF files" > "C:\Users\user\Desktop\dir.txt"
All sorted now, thank you
My System SpecsSystem Spec
08 Jan 2012   #6

Windows 8.1 Pro RTM x64
 
 

You're welcome.
My System SpecsSystem Spec
Reply

 Command Line Prompt - How To Export List of Files to Text File




Thread Tools



Similar help and support threads for2: Command Line Prompt - How To Export List of Files to Text File
Thread Forum
Need command line tool to list Hardware General Discussion
export files from text to speech General Discussion
SSH2 client for windows command line in batch no password prompt General Discussion
Looking for a Text to speal from a command line Sound & Audio
What command line I use to add a shortcut to the list of recent files? General Discussion
Window and Text size in Command Prompt, Windows XP Mode Virtualization
How to export command prompt settings frm the registry? General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 03:22 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33