Go Back  PPRuNe Forums > Misc. Forums > Computer/Internet Issues & Troubleshooting
Reload this Page >

Output the contents of a folder to a text file

Wikiposts
Search
Computer/Internet Issues & Troubleshooting Anyone with questions about the terribly complex world of computers or the internet should try here. NOT FOR REPORTING ISSUES WITH PPRuNe FORUMS! Please use the subforum "PPRuNe Problems or Queries."

Output the contents of a folder to a text file

Thread Tools
 
Search this Thread
 
Old 28th Jul 2007, 11:01
  #1 (permalink)  
Thread Starter
 
Join Date: Dec 2004
Location: Andalucia
Posts: 728
Received 0 Likes on 0 Posts
Output the contents of a folder to a text file

Collegue has a requirement to form an index of the contents of a folder. He has a large folder full of .pdf documents, all of which have "fully descriptive" hence long file names.

I did a search and came up with something from 2000 using the dos prompt, and listing the directory then using the &gt command to generate filename.txt. can't get this to work comes up as unknown command.

Am I missing something or is this a feature of the psuedo dos implementation in XP.

If this is so, how can I produce a listing of the contents of a folder that will subsequently be editable in word or notepad etc?
Wodrick is offline  
Old 28th Jul 2007, 11:27
  #2 (permalink)  
Bludger extraordinaire
 
Join Date: Jan 2005
Location: London/Frankfurt
Posts: 194
Likes: 0
Received 0 Likes on 0 Posts
I hope that I have interpreted your problem correctly. Please try:
dir /b >> foo.txt

BOFH
BOFH is offline  
Old 28th Jul 2007, 11:48
  #3 (permalink)  
Thread Starter
 
Join Date: Dec 2004
Location: Andalucia
Posts: 728
Received 0 Likes on 0 Posts
Ah thank you works perfectly just what was required
Wodrick is offline  
Old 28th Jul 2007, 21:02
  #4 (permalink)  
 
Join Date: Jun 2003
Location: EuroGA.org
Posts: 13,787
Likes: 0
Received 0 Likes on 0 Posts
One uses a single chevron i.e.

dir /b > name.txt
IO540 is offline  
Old 29th Jul 2007, 17:53
  #5 (permalink)  
Bludger extraordinaire
 
Join Date: Jan 2005
Location: London/Frankfurt
Posts: 194
Likes: 0
Received 0 Likes on 0 Posts
IO540

you are quite right. >> appends.

BOFH
BOFH is offline  

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.