Make USB flash drive Read Only

jenslost

Junior Member
Jan 24, 2013
6
0
0
Hi guys, I have a unique situation that I could use some help with. I want to be able to save files and folders on a USB flash drive that can not be erased. The tricky part is, this is to be read by several different models of sewing machines for embroidery use. Some sewing machines have to write something, i don't know what, to the flash drive in order to format the drive to work with the machine. The only solution I have heard of that may work is to partition the drive and then flip the removable bit to secure the files on one partition. None of which I know how to do. I can purchase a flash drive and have my data pre-loaded and then locked from several online USB sellers, but none can guarantee it will work, and the start up costs are something I can not afford to gamble with, and none of the companies I have contacted are willing to sell me a prototype. Help Please!
 

Harvey

Administrator<br>Elite Member
Oct 9, 1999
35,057
67
91
You may be able to accomplish what you want from the commmand line. Start by ascertaining the drive letter assigned to it.

From the Start menu, enter the command, CMD in the window (Start > Run in XP). This should bring up the command line (C: prompt).

Enter the command, ATTRIB E: +R *.* (assuming the flash drive is labeled E: )

This will set the attribute for all files in the root of the drive to Read Only. You can do this for any sub-folders on the flash drive, as well.

If you don't want all files on the drive to be Read Only, you can use the same commands to change just the ones you want, or if you want to set all but a few as Read Only, you can mark all of them and unmark just the few with a similar command, ATTRIB E:[filename] -R.

Hope that helps. :)
 
Last edited:
Feb 25, 2011
16,991
1,620
126
SD cards have a write-protect tab on them, so you could use one with a USB adapter. But that wouldn't allow the machines to write temp files.
 

jenslost

Junior Member
Jan 24, 2013
6
0
0
You may be able to accomplish what you want from the commmand line. Start by ascertaining the drive letter assigned to it.

From the Start menu, enter the command, CMD in the window (Start > Run in XP). This should bring up the command line (C: prompt).

Enter the command, ATTRIB E: +R *.* (assuming the flash drive is labeled E: )

This will set the attribute for all files in the root of the drive to Read Only. You can do this for any sub-folders on the flash drive, as well.

If you don't want all files on the drive to be Read Only, you can use the same commands to change just the ones you want, or if you want to set all but a few as Read Only, you can mark all of them and unmark just the few with a similar command, ATTRIB E:[filename] -R.



Hope that helps. :)

nope, sorry didn't work. it did deny me access if i tried to delete it from the command prompt, but in windows explorer and sewing machine, it will delete. thanks for the idea though
 

Harvey

Administrator<br>Elite Member
Oct 9, 1999
35,057
67
91
nope, sorry didn't work. it did deny me access if i tried to delete it from the command prompt, but in windows explorer and sewing machine, it will delete. thanks for the idea though

Try setting the attributes for the files/folders you want to protect in Windows Explorer. If it doesn't work, make sure you're logged on with Administrator privileges.

The worst that can happen is that it doesn't work, but at least, it's free to try. :)
 

yefi

Member
Nov 15, 2012
48
0
66
Do the sewing machines not see drives attached through a hub? If they can only see separate partitions, and they ignore read only attributes, your only option as I see is to program it at the firmware/hardware level, say with an AVR (which is non-trivial :)).