Go Back  FlyerTalk Forums > Travel&Dining > Travel Technology
Reload this Page >

Convert Directory of Files into Text File of File Names?

Convert Directory of Files into Text File of File Names?

Old Dec 23, 10, 8:53 pm
  #1  
Original Poster
 
Join Date: Apr 2001
Location: Austin
Programs: AA P4L, WN, BA, DL, UA, HHonors, IHG
Posts: 3,416
Convert Directory of Files into Text File of File Names?

As you look at the title of this thread, perhaps you can see why my Google searches have not been successful

I'm looking for some way to create a text tile containing the names of all the files in a Windows7 directory. Suggestions (other than switching to Linux)?

Thank you.
Middle_Seat is offline  
Old Dec 23, 10, 8:59 pm
  #2  
 
Join Date: May 2006
Posts: 1,934
I think it was something like doing this from the command prompt:

cd <directory name>
dir *.* > textfile.txt

where textfile.txt is your output file
KIXman is offline  
Old Dec 23, 10, 9:24 pm
  #3  
Original Poster
 
Join Date: Apr 2001
Location: Austin
Programs: AA P4L, WN, BA, DL, UA, HHonors, IHG
Posts: 3,416
Originally Posted by KIXman View Post
I think it was something like doing this from the command prompt:

cd <directory name>
dir *.* > textfile.txt

where textfile.txt is your output file
My bad: I should have asked for suggestions that did not involve linux or DOS
Middle_Seat is offline  
Old Dec 23, 10, 9:39 pm
  #4  
 
Join Date: May 2006
Posts: 1,934
is the reason for avoiding dos to make things user-friendly for somebody?

how about doing something like the procedure shown on this homepage:
http://www.theeldergeek.com/file_list_generator.htm

it still involves dos to work, but the user doesn't need to know the details.
KIXman is offline  
Old Dec 23, 10, 9:59 pm
  #5  
 
 
Join Date: Nov 2000
Location: Upcountry Maui, HI
Posts: 12,343
Originally Posted by Middle_Seat View Post
My bad: I should have asked for suggestions that did not involve linux or DOS
Open windows explorer, navigate to the directory you want, change the view to a list with or without details, select all, copy, paste into a text window?

what's wrong with using a dos to do it? You could even do it as a batch file. Something like this ...

Code:
@echo off
cd <directory you want>
dir /b
you put that in a batch file, and run it, redirecting the output to the output file you want. You could even make the directory name an argument to the batch file. So if you made the batch file dir-listing.bat, you would run it like ...

Code:
dir-listing.bat > whatever.txt

or

dir-listing.bat dirname ... > whatever.txt
This is similar to KIXman's suggestion, but the link he posted gives details on how to do it.


-David
LIH Prem is offline  
Old Dec 23, 10, 11:09 pm
  #6  
FlyerTalk Evangelist
 
Join Date: Jun 2002
Location: n.y.c.
Posts: 13,442
Originally Posted by LIH Prem View Post
You could even make the directory name an argument to the batch file. So if you made the batch file dir-listing.bat, you would run it like ...
Your suggestions are helpful, but someone who is squeamish about executing anything at the command prompt is not going to understand what an argument is.
nerd is offline  
Old Dec 24, 10, 4:03 am
  #7  
Original Poster
 
Join Date: Apr 2001
Location: Austin
Programs: AA P4L, WN, BA, DL, UA, HHonors, IHG
Posts: 3,416
I'm not a total noob to DOS, although I do think that any procedure that requires hitting the "\" key (backslash to Americans, forward slash to Brits?) was probably created by Satan himself

In this particular case the directory is fairly deep, and I'm unlikely to type all the characters of the path correctly. A little GUI thing that sits in the Context menu (like Bulk Rename) would be so easy!
Middle_Seat is offline  
Old Dec 24, 10, 4:27 am
  #8  
 
Join Date: May 2006
Posts: 1,934
Originally Posted by Middle_Seat View Post
A little GUI thing that sits in the Context menu (like Bulk Rename) would be so easy!
ah, but the link I put in my post above gives instructions on how to make the GUI thing to make things easy.
KIXman is offline  
Old Dec 24, 10, 4:59 am
  #9  
 
Join Date: Apr 2001
Location: Indianapolis, IN USA
Posts: 1,975
I just converted from 80gb hard drive to 1tb mirror raid1 hard drive and used this program to compare file copies and directory structures:

http://www.karenware.com/powertools/...n.asp#Download
bowdenj is offline  
Old Dec 24, 10, 6:17 am
  #10  
FlyerTalk Evangelist
 
Join Date: Sep 2000
Posts: 37,486
Here is another simple tool:

http://www.extrabit.com/copyfilenames/

It makes me sad that people no longer master basic DOS commands. GUI's have made us lazy
ScottC is offline  
Old Dec 24, 10, 7:25 am
  #11  
Original Poster
 
Join Date: Apr 2001
Location: Austin
Programs: AA P4L, WN, BA, DL, UA, HHonors, IHG
Posts: 3,416
Originally Posted by ScottC View Post
Here is another simple tool:
http://www.extrabit.com/copyfilenames/

It makes me sad that people no longer master basic DOS commands. GUI's have made us lazy
Thank you, ScottC, this does what I need.

As a person who originally learned how to drive a manual transmission car and use arm signals when preparing to turn, and formerly was proficient at Morse code (20 wpm), I appreciate old technologies but prefer newer, more-intuitive ones.
Middle_Seat is offline  
Old Dec 24, 10, 9:15 am
  #12  
FlyerTalk Evangelist
 
Join Date: Aug 2002
Location: Department of Homeland Sincerity
Programs: WN Platinum
Posts: 12,075
Originally Posted by bowdenj View Post
I just converted from 80gb hard drive to 1tb mirror raid1 hard drive and used this program to compare file copies and directory structures:

http://www.karenware.com/powertools/...n.asp#Download
I use TreeComp to compare directories, best program I have ever used, free and no install required. ^
UALOneKPlus is offline  
Old Dec 24, 10, 3:04 pm
  #13  
FlyerTalk Evangelist
 
Join Date: Jun 2004
Location: LON, ACK, BOS..... (Not necessarily in that order)
Programs: **Mucci Diamond Hairbrush** - compared to that nothing else matters (+BA Silver)
Posts: 12,874
Originally Posted by ScottC View Post
Here is another simple tool:

http://www.extrabit.com/copyfilenames/

It makes me sad that people no longer master basic DOS commands. GUI's have made us lazy
I agree, I recently asked someone to open a command prompt and they a) didn't know how to do this b) were totally baffled by the simple command I was asking them to input. It's just typing which isn't normally that hard, somehow the black background and white letters scares people.

Last edited by Jimmie76; Dec 24, 10 at 3:12 pm
Jimmie76 is offline  
Old Dec 24, 10, 4:23 pm
  #14  
 
Join Date: Jan 2006
Location: ORD
Programs: UA 1K
Posts: 1,084
Originally Posted by Middle_Seat View Post
I'm not a total noob to DOS, although I do think that any procedure that requires hitting the "\" key (backslash to Americans, forward slash to Brits?) was probably created by Satan himself

In this particular case the directory is fairly deep, and I'm unlikely to type all the characters of the path correctly. A little GUI thing that sits in the Context menu (like Bulk Rename) would be so easy!
If you type the first couple characters and press Tab, the command prompt will auto complete for you (and you can tab through multiple matches)...
bdesmond is offline  
Old Dec 24, 10, 4:32 pm
  #15  
 
Join Date: Dec 2000
Location: Seat 1A
Programs: Non-status paid F/J (best value for $$$)
Posts: 3,945
Originally Posted by ScottC View Post

It makes me sad that people no longer master basic DOS commands. GUI's have made us lazy
Agree.

Some people don't even know what a "file extension" is!! Windows 7 apparently hides the file extensions (.doc, .xls, .pdf, .wav etc.) of known file types by default.
daniellam is offline  

Thread Tools
Search this Thread
Search Engine: