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
bingefeller

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
unifex

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
bingefeller

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
Dwarf

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
bingefeller

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
Dwarf

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 Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
File - Delete from Command Prompt
How to Delete a File in Windows from the Command Prompt This tutorial will show you how to permanently delete a File in Vista, Windows 7, or Windows 8 using the DEL or ERASE command from within a command prompt. This can be handy if you cannot delete the file normally.While you can run...
Tutorials
Need command line tool to list Hardware
I'm not a windows guy to say the least, been an Linux admin going on 6 years now, but new job gave me 20 windows 7 servers/workstations to maintain. The issue I'm having is that when a client is logged on to one of my machines I can not login to check anything. If I attempt to login it boots...
General Discussion
Looking for a Text to speal from a command line
Hello I'm looking for a Text To Speak software to be accessible from a command line. TextToSpeech will read text inside the application. I'm looking only for text to be read from a string given by a command line Any information appreciated Martin
Sound & Audio
What command line I use to add a shortcut to the list of recent files?
I'd like to add files to list of recent files opened using line command to make an bat file. Can you relp me? I'd like to add in the list below.
General Discussion
Window and Text size in Command Prompt, Windows XP Mode
Anybody know how to change the text size in Windows XP Mode at the command prompt? I've tried right clicking on the DOS shortcut that I set up and changing it there, but it doesn't do anything. Also, I've set it to Full Screen, but everytime I execute a program, it shrinks to a smaller window....
Virtualization
How to export command prompt settings frm the registry?
Hello, I configured the command prompt window (size, colors, position) and now want to export this settings from the registry to save them in a reg file for later use on other computers. These setting do get saved somewhere in the registry but I don't remember where (did this on XP a couple of...
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 22:05.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App