Directoy file ghost RRS feed

  • Question

  • has anybody encounter using a recursive  function  that gets a listing of directory and subdirectories folder and files. (that works fine). Only it get file that are not on the floppy disk.  I have a floppy disk with 3 files on it and when I used the function I get 12 files.  the file that I see are from another floppy disk. does anybody know what could be happening?
    Monday, November 12, 2018 3:21 PM

All replies

  • Can you show us some code?
    Monday, November 12, 2018 4:08 PM
  • Hi Wadsky,

    If you want to get all files in a directory and subdirectories, please try the following code.

    string[] allfiles = Directory.GetFiles("path/to/dir", "*.*", SearchOption.AllDirectories);

    Best regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, November 14, 2018 2:27 AM
  • You actually have a floppy disk drive *and* floppy disks?!?!!?   Wow!!

    ~~Bonnie DeWitt [C# MVP]


    Wednesday, November 14, 2018 2:30 AM