Accessing file metadata on windows XP

Discussion in 'Python' started by wileyregister22@gmail.com, Nov 28, 2006.

  1. Guest

    When rightclicking a, for example, pdf file on windows, one normally
    gets a screen with three or four tags. Clicking on one of the summary
    tag one can get some info like "title", "Author", "category", "keyword"
    etc..

    My question is how can I programmatically read and change these data
    with python. I know I should use Hammond's win32 extension, somehow
    involving the pythoncom, storagecon of win32com etc.. Unfortunately,
    so far I cannot get anything useful. Instead of trying blindly, would
    somebody please points me to the correct direction. A little snippet
    would help. I am particular interested in pdf files.
    , Nov 28, 2006
    #1
    1. Advertising

  2. On 28 Nov 2006 00:55:34 -0800, declaimed the
    following in comp.lang.python:

    > When rightclicking a, for example, pdf file on windows, one normally
    > gets a screen with three or four tags. Clicking on one of the summary
    > tag one can get some info like "title", "Author", "category", "keyword"
    > etc..
    >

    Doesn't for me... Right-clicking on a PDF gives me a pop-up menu to
    open, print, compress to ZIP, send to application in a predefined list,
    copy/delete/rename, and access properties.

    > My question is how can I programmatically read and change these data
    > with python. I know I should use Hammond's win32 extension, somehow
    > involving the pythoncom, storagecon of win32com etc.. Unfortunately,
    > so far I cannot get anything useful. Instead of trying blindly, would
    > somebody please points me to the correct direction. A little snippet
    > would help. I am particular interested in pdf files.


    Unfortunately, you now encounter the difference between Windows
    (right-click/properties/summary) data, and what PDF format itself
    maintains internally (open in Reader, file/properties -- shows a lot
    more than Windows does). For the latter, you'd have to know the details
    of the PDF file format itself.

    --
    Wulfraed Dennis Lee Bieber KD6MOG

    HTTP://wlfraed.home.netcom.com/
    (Bestiaria Support Staff: )
    HTTP://www.bestiaria.com/
    Dennis Lee Bieber, Nov 28, 2006
    #2
    1. Advertising

  3. wrote in news: in
    comp.lang.python:

    > When rightclicking a, for example, pdf file on windows, one normally
    > gets a screen with three or four tags. Clicking on one of the summary
    > tag one can get some info like "title", "Author", "category", "keyword"
    > etc..
    >
    > My question is how can I programmatically read and change these data
    > with python. I know I should use Hammond's win32 extension, somehow
    > involving the pythoncom, storagecon of win32com etc.. Unfortunately,
    > so far I cannot get anything useful. Instead of trying blindly, would
    > somebody please points me to the correct direction. A little snippet
    > would help. I am particular interested in pdf files.
    >


    This looks like it might be useful:

    <url:http://msdn.microsoft.com/library/default.asp?url=/library/en-
    us/shellcc/platform/shell/reference/objects/shellfolderitem/shellfolderit
    em.asp>

    Thats:

    MSDN Home > MSDN Library > Win32 and COM Development > User Interface
    > Windows Shell > Windows Shell > Shell Objects for Scripting and

    Microsoft Visual Basic > ShellFolderItem >

    Rob.
    --
    http://www.victim-prime.dsl.pipex.com/
    Rob Williscroft, Nov 28, 2006
    #3
  4. Roger Upole Guest

    <> wrote in message news:...
    > When rightclicking a, for example, pdf file on windows, one normally
    > gets a screen with three or four tags. Clicking on one of the summary
    > tag one can get some info like "title", "Author", "category", "keyword"
    > etc..
    >
    > My question is how can I programmatically read and change these data
    > with python. I know I should use Hammond's win32 extension, somehow
    > involving the pythoncom, storagecon of win32com etc.. Unfortunately,
    > so far I cannot get anything useful. Instead of trying blindly, would
    > somebody please points me to the correct direction. A little snippet
    > would help. I am particular interested in pdf files.
    >


    See \win32com\test\testStorage.py for an example of using
    the storage interfaces to read and write document summary
    info.

    Roger




    ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
    Roger Upole, Nov 28, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    1,605
    Ken Cox - Microsoft MVP
    Mar 17, 2006
  2. Brett Selleck

    Schema Metadata not a Metadata Schema

    Brett Selleck, Sep 4, 2003, in forum: XML
    Replies:
    1
    Views:
    399
    Andy Dingley
    Sep 4, 2003
  3. EP
    Replies:
    2
    Views:
    15,379
    John Rhoads
    Jan 12, 2006
  4. Tim Golden
    Replies:
    0
    Views:
    460
    Tim Golden
    Nov 28, 2006
  5. Mike Wazowski

    Accessing Windows Media Metadata from Classic ASP

    Mike Wazowski, Sep 4, 2009, in forum: ASP General
    Replies:
    2
    Views:
    808
    Mike Wazowski
    Sep 7, 2009
Loading...

Share This Page