Hi all,
Is there an instruction in Matlab I can use to get and save Drive Serial Information of an installed hard drive (ex. C:\ drive)? Any suggestion will be helpful!
Thanks in advance

 채택된 답변

Walter Roberson
Walter Roberson 2022년 8월 25일

0 개 추천

S = system('wmic diskdrive get serialNumber')
Though I see some sites say
S = system('wmic bios get serialNumber')
The output is probably going to be two lines, with the first one being a header.
At the moment I do not know what happens if you have multiple drives.

댓글 수: 1

Chunru
Chunru 2022년 8월 25일
편집: Chunru 2022년 8월 25일
It list all drives installed in the system. For my machine, it lists down 4 disks installed.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Chunru
Chunru 2022년 8월 25일

0 개 추천

For windows machine, you can do the following:
[status, outpyt] = system("wmic diskdrive get model,serialnumber")
Iacopo
Iacopo 2022년 8월 26일

0 개 추천

Thanks everyone! With a small change, what I needed was:
S = system('wmic volume get serialNumber')
Thanks!

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품

질문:

2022년 8월 25일

답변:

2022년 8월 26일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by