I like to get the information "Picture captured at:" of a jpg file (created
with a digicam). This info I can get under file properties -> extended file
informations. There I have this Info "Picture captured at:".
So my question is: How can I get with VBS these extended file info values?
Thanks for every help!
Nijazi Halimaji
> Hi everybody
>
> I like to get the information "Picture captured at:" of a jpg file (created
> with a digicam). This info I can get under file properties -> extended file
> informations. There I have this Info "Picture captured at:".
>
> So my question is: How can I get with VBS these extended file info values?
Hi
For Windows XP and beyond:
Retrieving Extended File Properties
http://www.microsoft.com/resources/documentation/windows/2000/server/scriptguide/en-us/sas_fil_lunl.mspx
I would guess that "Date Picture Taken" is what you see as
"Picture captured at:"
In a command prompt, redirect output to file like this:
cscript.exe c:\scripts\file.vbs >file.txt
Some more examples:
Enumerate all properties for one file only:
'--------------------8<----------------------
strFolder = "D:\Pictures"
strFile = "IMG_1556.JPG"
Set objShellApp = CreateObject("Shell.Application")
Set objFolder = objShellApp.NameSpace(strFolder)
Set objFolderItem = objFolder.ParseName(strFile)
Dim arrHeaders(39)
For i = 0 To Ubound(arrHeaders)
arrHeaders(i) = objFolder.GetDetailsOf(objFolder.Items, i)
Next
For i = 0 To Ubound(arrHeaders)
Wscript.Echo i & vbtab & arrHeaders(i) _
& ": " & objFolder.GetDetailsOf(objFolderItem, i)
Next
'--------------------8<----------------------
Display only chosen properties:
'--------------------8<----------------------
strFolder = "D:\Pictures"
strFile = "IMG_1556.JPG"
Set objShellApp = CreateObject("Shell.Application")
Set objFolder = objShellApp.NameSpace(strFolder)
Set objFolderItem = objFolder.ParseName(strFile)
strSize = objFolder.GetDetailsOf(objFolderItem, 1)
WScript.Echo "Size: " & strSize
strDatePT = objFolder.GetDetailsOf(objFolderItem, 25)
WScript.Echo "Date Picture Taken: " & strDatePT
'--------------------8<----------------------
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
I liked your examples. Now how would I update this information in vbscript?
I have hundreds of images without descriptions. In a database I currently
have all my descriptions, subjects, keywords and photo dates. I don't need
help with the database part just how to write the properties.
thanks
LJB