How to obtain File information

Table A contains 2000 records listing the full path and filename of images stored on my system drive C:
The full path and filename is contained in Field B and looks like: C:\Images\FirstImage.JPG
The images are not embedded or linked.
Is there some way to retrieve the file type and file size for each image in either a Query or Report?
So for each image in Table A, the result would return file name, file type, and file size.
Appreciate the help with this!
clock1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mark DamenERP System ManagerCommented:
Hi

Not a full finished script, but a good starter for ten.

This script I found online, gets the file info from a file using VB

const bytesToKb = 1024
strFile = "C:\myfile.dat"

set objFSO = createobject("Scripting.FileSystemObject")
set objFile = objFSO.GetFile(strFile)

wscript.echo "File Size: " & cint(objFile.Size / bytesToKb) & "Kb"

Open in new window


This script, is able to update an access database using VB:

Const adOpenStatic = 3
Const adLockOptimistic = 3

Set objConnection = CreateObject("ADODB.Connection")
Set objRecordSet = CreateObject("ADODB.Recordset")

objConnection.Open _
    "Provider = Microsoft.Jet.OLEDB.4.0; " & _
        "Data Source = C:\Scripts\Inventory.mdb"

objRecordSet.Open "UPDATE Computers Set Department = 'None' " & _
    "Where Department = 'Human Resources'", _
    objConnection, adOpenStatic, adLockOptimistic

Open in new window


Finally, this script shows how to loop through records using VB:

Const adOpenStatic = 3
Const adLockOptimistic = 3

Set objConnection = CreateObject("ADODB.Connection")
Set objRecordSet = CreateObject("ADODB.Recordset")

objConnection.Open _
    "Provider = Microsoft.Jet.OLEDB.4.0; " & _
        "Data Source = C:\Scripts\Test.mdb" 

objRecordSet.Open "SELECT Top 5 * FROM Computers Order By Price", _
     objConnection, adOpenStatic, adLockOptimistic

objRecordSet.MoveFirst

Do Until objRecordset.EOF
    Wscript.Echo objRecordset.Fields.Item("ComputerName")
    objRecordset.MoveNext
Loop

objRecordSet.Close
objConnection.Close

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
clock1Author Commented:
Not a fan of using OLE.  Curios whether a Recursive directory procedure might work.  Trying that.  Thanks anyway.
0
clock1Author Commented:
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.