Thread: Drive Detection
View Single Post
  #1 (permalink)  
Old 06-25-2008, 12:26 PM
RandomCoder's Avatar
RandomCoder RandomCoder is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 487
Awards Showcase
Beta Tester 
Total Awards: 1
Default Drive Detection

Hi guys,

Been away for a while but just gettting back into some programming again.
Found a little tool for copying files and folders called ROBOCOPY, like the old DOS XCOPY but better (see here... Robocopy), and I'm wanting to automate this with B4PPC.

What I would like to know is if it is possible to detect when a USB drive has been plugged in?

The best I have come up with is to run a DirExist("MyBackup.etc") periodically to check if the USB drive is present but this is very hit and miss.
I'd much rather have some way of detecting that the drive has just been plugged in - is it possible?

Regards,
RandomCoder
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote