How do you retrieve the tags of a file in a list with Python (Windows Vista)?

前端 未结 4 768
悲&欢浪女
悲&欢浪女 2020-11-30 12:23

I want to make something of a tag cloud for various folders I have, but unfortunately, I can\'t seem to find a way to access the tags of a file in Windows Vista. I tried loo

4条回答
  •  生来不讨喜
    2020-11-30 12:49

    There are actually 2 different implentations of document properties (source).

    1. The COM implementation embeds them directly in the file itself : this is the approach used for Office documents for example. Tim Golden's code described on this page works well for these.

    2. On NTFS 5 (Win2k or later), you can add Summary info to any file, and it's stored in alternate data streams. I suppose the Windows Search API would work on these, but I have not tested it.

提交回复
热议问题