Jump to content

Recommended Posts

Guest learned
Posted

Is there any way using AutoIt to update the windows file properties metadata? By this I mean the fields such as Title, Subject, Keywords, Comments that are normally accessed via the properties dialog.

  • 2 years later...
Posted

Is there any way using AutoIt to update the windows file properties metadata? By this I mean the fields such as Title, Subject, Keywords, Comments that are normally accessed via the properties dialog.

hello, i was looking for the same thing and I found the Microsoft DSOFILE.dll library (search "dsofile" at http://www.microsoft.com/downloads it's free).

First register that DLL (regsvr32 path\dsofile.dll).

Here is some code :

CODE

$path = FileOpenDialog("Choose file (to read/modif some properties)",@ScriptDir,"All (*.*)")

$objPropertyReader = ObjCreate("DSOleFile.PropertyReader")

$objDocument = $objPropertyReader.GetDocumentProperties ($path)

MsgBox(0, "Keywords property", $objdocument.Keywords)

MsgBox(0, "Title property", $objdocument.Title)

$objdocument.Keywords = InputBox("input the new Keywords", "new keywordds")

$objdocument.Title = InputBox("enter the new Title", "new Title :")

MsgBox(0, "news Keywords of that file", $objdocument.Keywords)

MsgBox(0, "new Title", $objdocument.Title)

Limitation : it only works with compatible OLE file types (MSOffice...). It doesn't work with OpenOffice files.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...