Import File List into Database

A

Alan Z. Scharf

1. I would like to have a function which looks at a specified directory and
loads each filename in the directory into an Access table as a separate
record.

2. If possible, I would like to have the File Type and DataModified parsed
into separate columns in the table.

3. Also, I would like each filename entry to be a hyperlink to the file.
These would be various documents, e.d. .doc, .pdf.

Any direction would be appreciated.

Thanks.

Alan

___________________________
Alan Z. Scharf
GrapeVine Systems
New York City
 
A

Alick [MSFT]

Hi Alan,

You may try FileSystemObject;

1. There is an article 185601 you can refer to (though the article is VB6,
the code is similar/same in Access), this article uses FileSystemObject to
find a specific file in a given folder; you can modify the FindFile
function in the article 185601 to list all the files in the given folder;
once you get the file name, we can open the table and write the information
into it by using RecordSet object.

HOW TO: Recursively Search Directories by Using FileSystemObject
http://support.microsoft.com/default.aspx?scid=kb;EN-US;185601

2. we can use the file extension to determine file type, use FileDateTime
Function to determine the date and time when a file was created or last
modified.

FileDateTime Function
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/
vafctfiledatetime.asp

3. You may define a hyperlink column/field in the table, and
programmatically add the file path and name string to this field.

Please feel free to let me know if you have any questions or concerns.



Sincerely,

Alick Ye, MCSD
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


--------------------
| Reply-To: "Alan Z. Scharf" <[email protected]>
| X-Tomcat-NG: microsoft.public.access.modulesdaovba.ado
|
| 1. I would like to have a function which looks at a specified directory
and
| loads each filename in the directory into an Access table as a separate
| record.
|
| 2. If possible, I would like to have the File Type and DataModified parsed
| into separate columns in the table.
|
| 3. Also, I would like each filename entry to be a hyperlink to the file.
| These would be various documents, e.d. .doc, .pdf.
|
| Any direction would be appreciated.
|
| Thanks.
|
| Alan
|
| ___________________________
| Alan Z. Scharf
| GrapeVine Systems
| New York City
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top