-4

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.

  • 3
    Did you do any research before asking this question? Typing the nouns in your question into the search box gives: https://stackoverflow.com/questions/135445/how-can-i-detect-if-there-is-a-floppy-in-a-drive – Eric Lippert Jul 26 '18 at 16:53
  • 1
    @EricLippert I like that a comment on that post from 2008 says, "who has floppy drives any more?" – Zach Saucier Jul 26 '18 at 16:57
  • I did research this. The post you mentioned has a C/C++ solution. I'm looking for C#. I see this is being downvoted so I'll get now help here. Great. – user3306752 Jul 26 '18 at 17:07
  • I had to get a USB floppy drive. These are images taken by my late father with a very early digital camera. Lots of memories on there. – user3306752 Jul 26 '18 at 17:08

1 Answers1

1

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
Steve
  • 11,696
  • 7
  • 43
  • 81