WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

DSOFILE
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Reading and Writing Properties of Image Files

 Keywords: Reading  Writing Properties Summary Image Files 

Question:

I am interested in Reading and Writing Properties of Image Files from a WinBatch script

Answer:

I recommend using DSOFILE to handle it. Dsofile (Dsofile.dll) is actually an incredibly useful tool for script writers: it provides a quick and easy way to read from and write to the summary information property set for all your files.

Reference: http://technet.microsoft.com/en-us/library/ee692828.aspx

Download and install DSOFILE here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9ba6fac6-520b-4a0a-878a-53ec8300c4c2&DisplayLang=en

#DefineFunction DsoRead( filename , propertyname)
   objFile = CreateObject("DSOFile.OleDocumentProperties")
   objFile.Open( filename )
   objFile = 0
   Return objFile.SummaryProperties.%propertyname%
#EndFunction

filename = 'D:\temp\Data\Book1.xlsx'
propertylist =  'ApplicationName,Author,ApplicationName,Author,ByteCount,Category,CharacterCount,CharacterCountWithSpaces,Comments,Company,DateCreated,DateLastPrinted,DateLastSaved,HiddenSlideCount,Keywords,LastSavedBy,LineCount,Manager,MultimediaClipCount,NoteCount,PageCount,ParagraphCount,PresentationFormat,RevisionNumber,SharedDocument,SlideCount,Subject,Template,Title,TotalEditTime,Version,WordCount'
count = ItemCount( propertylist, ',' )
For i = 1 To count
   result = DsoRead( filename , ItemExtract( i, propertylist, ',' ))
   Pause( propertyname, result )
Next

Article ID:   W18071
Filename:   Reading Properties of Image Files .txt
File Created: 2010:09:29:11:16:26
Last Updated: 2010:09:29:11:16:26