Go Back   PCMech Forums > Windows Support > Windows Legacy Support (XP and earlier)

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 08-31-2003, 05:49 AM   #1
Member (10 bit)
 
Join Date: Oct 1999
Location: Melbourne, Australia
Posts: 688
Send a message via ICQ to Danny G
Saving Lists of Files

I have a large list of files that i wish to save. Just the filenames not the actual data itself.

I just want to save them into a word document or some other readable file thats all. Taking screen dumps is just too timeley a process on a 15" screen.

I tried Google, MS Help and Searching the archives here with no help unfortunatly.
Danny G is offline   Reply With Quote
Old 08-31-2003, 06:48 AM   #2
Anime:Any-may
 
mystvearn's Avatar
 
Join Date: Sep 2002
Location: Kota Bharu, Malaysia
Posts: 2,447
Print scrn button, still you need to type the files to word.
mystvearn is offline   Reply With Quote
Old 08-31-2003, 10:13 AM   #3
Premium Member
 
Statica's Avatar
 
Join Date: Jun 1999
Posts: 9,231
Assuming you know a bit of basic DOS commands ..
Open a command prompt, CLI, (START > RUN > cmd)
Navigate to the directory in question.
and issue the following
dir > list.txt
you can then open up the file list.txt that is created to see the listing.
if you wish to get a list of files in that directory and in subsequent sub-directories you can do
dir /s > list.txt

since its in a txt format anyway, you can copy and paste to whichever application you need.


quick primer
to change drives th command is drive_letter:
for example - if you are in C:\Documents and Settings\Danny\ and you wish to to go D: simply type D:
to change directories/folders type cd followed by the directory name.
for example: if you are in D:\ and wish to go to My Documents then type:
cd "My Documents" (with the quotes as it is a long filename
if you wish to go up one directory type cd ..
Statica is offline   Reply With Quote
Old 09-01-2003, 12:29 AM   #4
Member (10 bit)
 
David_Jones's Avatar
 
Join Date: May 2000
Location: New Zealand
Posts: 546
Statica's answer is clearly the best approach and most generic.

However, if you have Excel, then the following code, in a module, will get them listed in Excel too.

If you want, you can then use Data - Text to Columns and delimit using the \ symbol.

HTH,

David.






Sub IndexFiles()

' To use, select cell A1 (say) in an empty worksheet
' Tools - Macro - Macros - IndexFiles
' When it completes, you should have a full path listing of
' all files and folders in the named directory

With Application.FileSearch

' Change the path below for the top level folder you
' want to search

.LookIn = "C:\My Documents"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
.Execute

End With

cnt = Application.FileSearch.FoundFiles.Count

For i = 1 To cnt

rng = "A" & i

Range(rng).Value = Application.FileSearch.FoundFiles.Item(i)

Next i

End Sub
David_Jones is offline   Reply With Quote
Old 09-01-2003, 04:28 AM   #5
Member (10 bit)
 
Join Date: Oct 1999
Location: Melbourne, Australia
Posts: 688
Send a message via ICQ to Danny G
Statica and David Jones,

Thank you for your prompt repsonse. I tried your method first David but due a complete lack of knowledge about Macros I got myself tied in knots.

So I tried Statica's method and in 2 mins all the data I needed. Worked a treat! Thanks for the quiet reminder on how to use Command Prompt. A good refresher guide although I think the hardest things I found was finding it in XP....

Anyhow thanks for your help again guys.
Danny G is offline   Reply With Quote
Old 09-01-2003, 08:55 AM   #6
Member (12 bit)
 
RayH's Avatar
 
Join Date: Nov 1999
Location: San Francisco
Posts: 2,437
I use a Directory Printer!
RayH is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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



All times are GMT -5. The time now is 07:12 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2