Format Drive in Python

后端 未结 2 933
悲哀的现实
悲哀的现实 2021-01-07 08:55

I\'m attempting to make a Python 3.3 program to format a drive in Windows such as a SD Card or USB Stick. I tried the code here: http://bytes.com/topic/python/answers/537724

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-07 09:04

    I found the solution! This line:

     FMIFS_HARDDISK = 0x0C
    

    should be like this

     FMIFS_UNKNOWN = 0
    

    That simply makes it format by Unknown!

提交回复
热议问题