Help reading image extended info such as Author Width Comments, Etc

T

tom

I'm trying to read in image data using the filesystemobject. I am able
to read the comments field for all file types it seems, except the ones
I want, .gif .jpg and .bmp.

Is it possible to do this?! If so what might I need to do?

Thanks!

here is the script im using to loop through each possible sub field:

Dim arrHeaders(34)
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("E:\images")
For i = 0 to 33
arrHeaders(i) = objFolder.GetDetailsOf(objFolder.Items, i)
Next
For Each strFileName in objFolder.Items
For i = 0 to 33
Response.Write( i & vbtab & arrHeaders(i) & ": " &
objFolder.GetDetailsOf(strFileName, i) & "<br>")
Next
Next
 
M

Mike Brind

I'm trying to read in image data using the filesystemobject. I am able
to read the comments field for all file types it seems, except the ones
I want, .gif .jpg and .bmp.

Is it possible to do this?! If so what might I need to do?

Thanks!

here is the script im using to loop through each possible sub field:

Dim arrHeaders(34)
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("E:\images")
For i = 0 to 33
arrHeaders(i) = objFolder.GetDetailsOf(objFolder.Items, i)
Next
For Each strFileName in objFolder.Items
For i = 0 to 33
Response.Write( i & vbtab & arrHeaders(i) & ": " &
objFolder.GetDetailsOf(strFileName, i) & "<br>")
Next
Next

Your script works perfectly for image files as-is when I tried it. Eg,
it returned this for a gif file:

0 Name: bgcolor
1 Size: 1 KB
2 Type: GIF File
3 Date Modified: 17/10/2005 11:51
4 Date Created: 10/08/2006 08:27
5 Date Accessed: 10/08/2006 08:27
6 Attributes: A
7 Status: Online
8 Owner: Administrators
9 Author:
10 Title:
11 Subject:
12 Category:
13 Pages:
14 Comments:
15 Copyright:
16 Artist:
17 Album Title:
18 Year:
19 Track Number:
20 Genre:
21 Duration:
22 Bit Rate:
23 Protected:
24 Camera Model:
25 Date Picture Taken:
26 Dimensions: 25 x 24
27 : 25 pixels
28 : 24 pixels
29 Episode Name:
30 Program Description:
31 :
32 Audio sample size:
33 Audio sample rate:
 
T

tom

Mike,

Try right clicking a file, going to properties.. summary tab.. and
entering in something for author, comments, etc. See if that works.

I get that default information as well, just not the
comments/author/etc fields. If yours works, what might be wrong on my
side that would prevent that from happening?

Thanks!

Tom
 
M

Mike Brind

OK.

GIF and BMP formats don't appear to allow editing of the properties you
listed (at least not on my setup - XP Pro, SP2). The edit fields are
greyed out. I can edit the properties for a JPG file, and the code
picks up and displays them all:

9 Author: Test Author
10 Title: Test title
11 Subject: Test Subject
12 Category:
13 Pages: 1
14 Comments: Test comment

Have you access to another machine/OS you can test this on?
 

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

Members online

Forum statistics

Threads
474,141
Messages
2,570,814
Members
47,359
Latest member
Claim Bitcoin Earnings. $

Latest Threads

Top