Solved

How can I list every document on a hard drive in Excel or Access?

Posted on 2009-07-15
7
391 Views
Last Modified: 2013-11-28
I have a hard drive with thousands of documents on it (in folders and sub folders).  Is there any way I can create an Excel list or Access datatabase so I can see the document titles?  I want to do this so I can compare it to another list I already have to see what documents are missing.  
   
0
Comment
Question by:matthewjp
  • 3
  • 3
7 Comments
 

Expert Comment

by:TheCaptainjs
ID: 24862175
open up Windows Search (Windows key + F)
Go to advanced or all files and folders
Change the Location or Look In to be the hard drive you are looking in
for the search term/ all or part of the file name enter: *.xls, *.mdb, *.xlsx, *.accdb
0
 

Author Comment

by:matthewjp
ID: 24863050
Thanks, I can get a list of names doing it this way - but can't copy and paste it into Access or Excel.  
Is this possible?
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
ID: 24866765
matthewjp,

Try this.

Copy the DB and the Batch file to you c:\ directory.
Rename the batch File : ListAllFiles.bat
Open the db and click the form button.

Notes.
This is code I pieced togeter in a hurry.  It can definitely be optimized. (or even done entirely in VBA)

Issues:
The code will fail if the List file is not "Fully" written to the disk.  So I added a message box to tell the user to wait a while.
You may get an error table, because some on the filenames are longer than 255 characters.

I am sure you can take it from here...


JeffCoachman
Accesss-EEQ-24573148-list-all-fi.zip
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

Author Comment

by:matthewjp
ID: 24870910
Hi jeff,
  I tried to extract the files, but it says it's password protected.  
Thanks,
Matt
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 24872569
I just tried downloding and extracting the file(s) from a remote location, and it downloaded and extracted without issue.
Try downloading the file again.

Here it is again in any event...
Accesss-EEQ-24573148-list-all-fi.zip
0
 

Author Comment

by:matthewjp
ID: 24873991
I really appriciate the help!  
It worked great!!  I did have to run the batch file manually first, then remove that part of the code from Access but after that I got exaclty what I needed.  Thanks so much!!!!  
You did a great service to your country (since I work for the gov't)  : )
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 24884044
OK, I'll try to clean it up a bit this weekend and post it again
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question