基 础 函 数 参 考


DriveSetLabel

修改驱动器卷标.

DriveSetLabel ( "路径", "卷标" )

参 数

路径 目标驱动器的路径e.
卷标 驱动器的新卷标.(最长 11 个字符)

返 回 值

成功: 返回 1.
失败: 返回 0.

备 注

大多数硬盘驱动器的卷标最长 11 个字符, 如果指定的卷标长度超出限制, 则 DriveSetLabel 函数失败.
文件系统是 FAT32, 则其卷标的所有字符会自动转换为大写字符.

相 关 函 数

DriveGetDrive, DriveGetFileSystem, DriveGetLabel, DriveGetSerial, DriveGetType, DriveSpaceFree, DriveSpaceTotal, DriveStatus

函 数 示 例


DriveSetLabel("C:\", "New_Label")

; 得到当前卷标
Local $var=DriveGetLabel("c:\")
; 设置卷标
DriveSetLabel("C:\", "新卷标")
MsgBox(32,"","卷标已设置")
DriveSetLabel("C:\", $var)

provider with jb51.net (unicode)