Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2009-07-15
7
Medium Priority
?
398 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 2000 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Windows Server 2003 introduced persistent Volume Shadow Copies and made 2003 a must-do upgrade.  Since then, it's been a must-implement feature for all servers doing any kind of file sharing.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

886 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