DEV Community

Indra Wahyu
Indra Wahyu

Posted on

Make Flash Drive as Read Only Like DVD Drive (CMD)

I have an important file on my flash drive and I want to make it read only

My best option is use DISKPART form windows, run this code on CMD

DISKPART
Enter fullscreen mode Exit fullscreen mode

To check which flash drive listed as disk in windows

LIST DISK
Enter fullscreen mode Exit fullscreen mode

It should be disk 1 if you have single hardisk attached to computer, disks naming starts from 0 but partition starts from 1

SELECT DISK 1
Enter fullscreen mode Exit fullscreen mode

Set as read only

ATTRIBUTES DISK SET READONLY
Enter fullscreen mode Exit fullscreen mode

Reference

Top comments (0)