How can I detect a Floppy Disc being inserted and then copy the files?

309 Views Asked by At

I have a boat load of old floppy discs that have images on them. I want to copy them, but they have file names that are often duplicated. I'd have a batch file that will copy and rename the files, but I have to run it every time I insert the disc. I was trying to make a C# application to detect when the status of the drive changes and then automatically copy and rename the files based on the current date/time.

Thanks in advance.

1

There are 1 best solutions below

1
On

Since this is for yourself, you don't need a bullet proof solution.

Heres the high level algorithm that could be done easily in c#

1. Make a function that lists all files in the floppy drive and return if it succeed. Call it something like FloppyReady()  
2. Loop until FloppyReady returns true
3. Copy all files and do your renaming scheme
4. Loop until FloppyReady returns false (floppy removed)
5. Goto #2