Sign in with
Sign up | Sign in
Your question

Erase FlashDrive when opening it

Tags:
  • Flash Media
  • Flash Drive
  • Storage
Last response: in Storage
Share
February 17, 2011 5:42:48 AM

Hello, i was wondering if there was a c++ program or something i could attach to an auto play file so when i open my flashdrive it erases everything on it

More about : erase flashdrive opening

a b G Storage
February 20, 2011 5:31:58 PM

This topic has been moved from the section Mobile Computing to section Storage by Buwish
a c 415 G Storage
February 20, 2011 6:30:18 PM

All you have to do is to point the autoplay file at a batch file that contains a DOS command to delete all of the files on the same drive as the batch file:

del /s %~d0\*

...of course this will also delete the batch file itself. And it won't work if the system that you put the flash drive into has been configured to disable Autoplay (as all secure systems should be).
!