Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

File System object Title property

897 views
Skip to first unread message

@lindstromminnesotausa Craig Roberts

unread,
Jan 14, 2008, 10:23:49 AM1/14/08
to
For a set of photos, I've used Microsoft's Photo Info tool to key into title
and description.

Can I use the VBS FileSystemObject to pull these out? is there another
object that sees this data? Do you have a reference?

Thanks!


Trevor Sullivan

unread,
Jan 14, 2008, 11:14:51 AM1/14/08
to
The FileSystemObject is not going to retrieve this data for you.

If you want a COM object that will retrieve photo metadata, I'd suggest
SImage, which you can get here: http://www.reneris.com/tools/default.asp

----------------
Trevor Sullivan
Systems Engineer

Tom Lavedas

unread,
Jan 14, 2008, 11:45:41 AM1/14/08
to

If all he wants is the title (and maybe everything he could possibly
want), the GetDetailsOf method of the Shell.Application class can do
that. For example ...

sFilename = "ImageName.jpg"
sFolderPathspec = "X:\Image\location\Folder"

Set objShell = CreateObject ("Shell.Application")
Set objFolder = objShell.Namespace(sFolderPathspec)

wsh.echo strFileName, "Title: ", _
objFolder.GetDetailsOf(objFolder.Parsename(sFileName), 10)

Properties that are enumerated by this method and their index are:

0 Name
1 Size
2 Type
3 Date Modified
4 Date Created
5 Date Accessed
6 Attributes
7 Status
8 Owner
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
27
28
29 Episode Name
30 Program Description
31
32 Audio sample size
33 Audio sample rate
34 Channels
35 Company
36 Description
37 File Version
38 Product Name
39 Product Version
40 Keywords

The list of properties available in a particular folder is found
thus ...

sFolderPathspec = "X:\Image\location\Folder"

Set objShell = CreateObject ("Shell.Application")
Set objFolder = objShell.Namespace(sFolderPathspec)
Dim arrHeaders(40)

For i = 0 to 40
arrHeaders(i) = i & " " & objFolder.GetDetailsOf(objFolder.Items,
i)
Next

wsh.echo join(arrHeaders, vbNewline)

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/

mayayana

unread,
Jan 14, 2008, 12:02:24 PM1/14/08
to
There are actually two formats used to store photo
info.: IPTC and EXIF. If you have digital camera photos
they're probably using EXIF. Tom Lavedas may be right that
you can read some of those through Shell.Application.
But you should avoid writing the properties via Microsoft
tools. I wrote a component DLL some time ago for reading
and writing IPTC data, and in the course of my research
I discovered that, while IPTC and EXIF data can co-exist,
Windows Summary tab info. uses a version of EXIF that
Microsoft made up and which is not in accord with the EXIF
standard. And Windows does not recognize IPTC data at all.
If you save info. through the Summary tab (...and maybe via
Shell.App. I'm not sure about that...), any existing IPTC or
EXIF data will probably be corrupted and/or lost.

One of the few programs I know of that's fully aware of both
EXIF and IPTC is IrfanView, but IrfanView doesn't seem
to have command line options for accessing that data.

@lindstromminnesotausa Craig Roberts

unread,
Jan 14, 2008, 11:27:33 PM1/14/08
to
Thank you Trevor, Tom and Mayayana.

The tool I was using is Microsoft Photo Info, build 1.0.

Yes, it put data in both EXIF and IPTC format locations:

MS Photo EXIF IPTC
Title "Object Name"
Author Artist Author Name
Description Comment Description

Exifer also reads both formats. http://www.exifer.friedemann.info build
2.1.5

Don't know about scripting access to both formats - I'm still checking on
that.

Thanks again!

Craig


"mayayana" <mayaXX...@mindXXspring.com> wrote in message
news:%23FqAb9s...@TK2MSFTNGP06.phx.gbl...

cp...@yahoo.com

unread,
Jan 20, 2008, 5:30:41 PM1/20/08
to
I need a tool that can help me get my pictures organized, I have been
trying to write something using simage, however there are a number of
images that simage seems to be failing to get data on (seems to be
after rotating the image). After seeing this post I got excited, but
it seems that when I do something like:
wsh.echo objFile.Name, "Date/Time Taken: ", _
objFolder1.GetDetailsOf(objFolder1.Parsename(objFile.Name), 25)
I get a response like:
DSC02481.JPG Date/Time Taken: 7/20/2006 7:44 PM
But without the seconds, it doesn't seem to be useful, as it's missing
the seconds, and without those it appears there are lots of
duplicates.

Am I missing something?

And perhaps the better question, is there a tool out there that will
look through my horrible images directories and organize them by Year/
Month resolving (duplicate file name, but different picture taken time
[different pictures]) and (duplicate file name, duplicate picture
taken time [duplicate picture]) issues?

0 new messages