|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (10 bit)
|
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. |
|
|
|
|
|
#2 |
|
Anime:Any-may
Join Date: Sep 2002
Location: Kota Bharu, Malaysia
Posts: 2,447
|
Print scrn button, still you need to type the files to word.
|
|
|
|
|
|
#3 |
|
Premium Member
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 .. |
|
|
|
|
|
#4 |
|
Member (10 bit)
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 |
|
|
|
|
|
#5 |
|
Member (10 bit)
|
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. |
|
|
|
|
|
#6 |
|
Member (12 bit)
Join Date: Nov 1999
Location: San Francisco
Posts: 2,437
|
I use a Directory Printer!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|