How do I get the volume serial number for a drive? For example in the
cmd prompt issuing this:
C:\vol C:
Volume in drive C is LABEL
Volume Serial Number is -
Is the volume serial number wrapped by pywin32? I found the function
win32api.GetVolumeInformation, but it doesn't seem
-win32] Volume Serial Number
How do I get the volume serial number for a drive? For example in the cmd
prompt issuing this:
C:\vol C:
Volume in drive C is LABEL
Volume Serial Number is -
Is the volume serial number wrapped by pywin32? I found the function
That's not the serial number of the drive- as assigned by the drive
manufacturer.
If you want the SN from the drive manufacturer, you will need to issue an
IOCTL ATA Passthrough command which sends the ATA Identify Device command
to the drive. Unless the Winapi has a wrapper for that
Rickey, Kyle W wrote:
How do I get the volume serial number for a drive? For example in the
cmd prompt issuing this:
C:\vol C:
Volume in drive C is LABEL
Volume Serial Number is -
Is the volume serial number wrapped by pywin32? I found the function
Message: 5
Date: Fri, 16 May 2008 10:35:45 -0500
From: Rickey, Kyle W [EMAIL PROTECTED]
Subject: [python-win32] Volume Serial Number
To: python-win32@python.org
Message-ID:
[EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii
How do I get the volume serial number
Tony Cappellini wrote:
How do I get the volume serial number for a drive? For example
in the
cmd prompt issuing this:
It looks like Tim Golden has a way to do what you want- via Python!
http://tgolden.sc.sabren.com/python/win32_how_do_i/see_if_two_files_are_the_same_file.html
Tim
Rickey, Kyle W wrote:
How do I get the volume serial number for a drive? For example in the
cmd prompt issuing this:
WMI to the rescue?
code
import wmi
for volume in wmi.WMI ().Win32_LogicalDisk ():
print volume.Caption, =, volume.VolumeSerialNumber
/code
TJG
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tim Golden
Sent: Friday, May 16, 2008 12:45 PM
Cc: python-win32@python.org
Subject: Re: [python-win32] Volume Serial Number
Rickey, Kyle W wrote:
How do I get the volume serial number for a drive
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
) =
Tony Cappellini wrote:
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,
10 matches
Mail list logo