Skip to content

dos_hdserialno

Dale Fugier edited this page Jul 1, 2026 · 1 revision

Returns the serial number of a physical hard drive.

Syntax

(dos_hdserialno drive)

Parameters

drive

The drive name (for example, C:, D:).

Returns

A string identifying the physical drive's serial number if successful.

nil on error.

Example

Command: (dos_hdserialno "C:")
"W1E2ABCD1234"

Note, this is the hardware serial number reported by the drive itself, which is different from the volume serial number returned by dos_serialno.

Clone this wiki locally