[python-win32] Volume Serial Number
Tony Cappellini
cappy2112 at gmail.com
Fri May 16 20:30:42 CEST 2008
>>Tim Golden has a way to do just about everything, but this particular
>>snippet has nothing to do with the original question.
def get_unique_id (hFile):
(
attributes,
created_at, accessed_at, written_at,
volume,
file_hi, file_lo,
n_links,
index_hi, index_lo
) = win32file.GetFileInformationByHandle (hFile)
return volume, index_hi, index_lo
The link I posted certainly has a misleading name, but the code above
(from that link) returns the volume SN.
Is the fifth item returned from
GetFileInformationByHandle() not the Volume SN?
[0] *int* : dwFileAttributes
[1] *PyTime <PyTime.html>* : ftCreationTime
[2] *PyTime <PyTime.html>* : ftLastAccessTime
[3] *PyTime <PyTime.html>* : ftLastWriteTime
[4] *int* : dwVolumeSerialNumber
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20080516/734b1e2c/attachment.htm>
More information about the python-win32
mailing list