Hi Bee,
If you're keeping your data in an mdb file it's not a good idea to store
the image data in the database: instead, leave it in the folders and
just store the paths, filenames, etc. There's a PictureMgr sample
database at http://www.datastrat.com/DataStrat2.html which shows the
techniques.
To get the file information from the drive, there are several ways to
go. I'd use the VBScript FileSystemObject object, which is in the
Microsoft Scripting Runtime library. This lets you do something like
this untested air code:
Dim dbD As DAO.Database
Dim rsR As DAO.Recordset
Dim oFS As Scripting.FileSystemObject
Dim oF As Scripting.Folder
Dim oS As Scripting.File
Dim strType As String
Dim strFolder As String
Dim lngSize As Long
strFolder = "C:\Folder\Subfolder"
strType = "jpg"
Set dbD = CurrentDB()
Set rsR = dbD.OpenRecordset("MyTable")
Set oFS = CreateObject(strFolder)
Set oF = oFS.GetFolder("C:\Folder\Subfolder")
If oF.Files.Count > 0 Then
For Each oS In oF.Files
If Right(oS.Name, Len(strType)) = strType Then
With rsR
.AddNew
.Fields("FileName").Value = oS.Name
.Fields("FileType").Value = oS.Type
.Fields("FileSize").Value = oS.Len
.Update
End If
Next
End If
rsR.Close
Set rsR = Nothing
Set dbD = Nothing
Set oS = Nothing
Set oF = Nothing
Set oFS = Nothing
>I am creating a database that is only to hold information
>of the image files of a hard drive. How can i bulk input
[quoted text clipped - 6 lines]
>
>Charlie
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.