Password USB

Is it possible to have a batch file on a memory stick, so that when the stick is plugged in it asks for a password in cmd. If the password is correct then it is just like a normal memory stick. But if the password is wrong then the memory stick is ejected. The file can either be .js or .bat because thats all i know how to use.

Thanks
 
What would prevent someone from accessing the files on the thumbdrive when it's plugged in and waiting for the password to be entered?
 
Back
Top