← Back to team overview

sikuli-driver team mailing list archive

[Question #223180]: How to read windows file properties?

 

New question #223180 on Sikuli:
https://answers.launchpad.net/sikuli/+question/223180

I am trying to read windows file properties and reading on python options it seems that some people are using extensions called PYWIN32 ??

im having difficulty translating or interpreting the syntax into something I can use in Sikuli mainly with the whole import part first.

This was one of the examples i saw that I wanted to try but couldn't:

"from win32com.client import Dispatch

ver_parser = Dispatch('Scripting.FileSystemObject')
info = ver_parser.GetFileVersion(path)

if info == 'No Version Information Available':
    info = None"




maybe i'm going about this wrong?

Instead of using:
subprocess.Popen('explorer os.path.join('c:', os.sep, 'tssmoketest', tsVersion)') to open an explore window and then using a whole bunch of scrolls/finds and right clicks to get to properties...

i was hoping to find some way to just go directly to the file itself and read/print certain attributes such as:

value in the Version tab
if a digital signature is present etc..

things like that.

for now i'm using the right click scroll options to get by but id like a more direct cleaner method if possible. 

Thanks in advance!

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.