The Cellar  

Go Back   The Cellar > Main > Technology

Technology Computing, programming, science, electronics, telecommunications, etc.

Reply
 
Thread Tools Display Modes
Old 10-11-2007, 07:51 AM   #1
glatt
 
Join Date: Jul 2003
Location: Arlington, VA
Posts: 27,717
Importing file names from a folder into a text file?

Is there a simple way to take a bunch (around 300) of file names from a folder in Windows XP and dump those names into a single text file so you can edit them? I know you can do them one at a time by copying and pasting, but is there some other way to do all at once?

Is there a way to do this in DOS? It's been too many years since I used DOS and can't remember, but I think there was a way to at least print the file names. Maybe DOS is the best approach?

I really don't want to copy and paste these names individually. Help!
glatt is offline   Reply With Quote
Old 10-11-2007, 09:28 AM   #2
Pie
Gone and done
 
Join Date: Sep 2001
Posts: 4,808
dir > temp.txt

open in editor of your choice.
__________________
per·son \ˈpər-sən\ (noun) - an ephemeral collection of small, irrational decisions
The fun thing about evolution (and science in general) is that it happens whether you believe in it or not.
Pie is offline   Reply With Quote
Old 10-11-2007, 09:42 AM   #3
glatt
 
Join Date: Jul 2003
Location: Arlington, VA
Posts: 27,717
Thanks!
glatt is offline   Reply With Quote
Old 10-11-2007, 12:18 PM   #4
dar512
dar512 is now Pete Zicato
 
Join Date: May 2003
Location: Chicago suburb
Posts: 4,968
Add a /b if you only want the filenames

dir /b
__________________
"Against stupidity the gods themselves contend in vain."
-- Friedrich Schiller
dar512 is offline   Reply With Quote
Old 10-11-2007, 12:30 PM   #5
glatt
 
Join Date: Jul 2003
Location: Arlington, VA
Posts: 27,717
That (/b) tip works like a charm. Then with a little "find and replace" action, I was able to get rid of all the path information in the front of the file names. I've now got a nice neat list.

Thanks.

You'd think Windows would make such a simple thing possible though, without resorting to DOS. Not many people out there know DOS.
glatt is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 04:41 PM.


Powered by: vBulletin Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.