How to cycle through files in a folder


  • In Visual Studio 2005 Visual Basic, I want to create an exe (without any forms) that will cycle through each file in a folder.  I have not found any method of cycling through file names in a folder.  Does anybody know how to do this?

    Friday, January 15, 2010 6:23 PM


  • Have you try this:

     for each fi as string in My.Computer.FileSystem.GetFiles("folder")'Replace folder for you wanted..
    'do something...

    Si la respuesta te ha sido util Marcala como Respuesta o Votala.
    Mi Blog: Jtorrecilla
    Friday, January 15, 2010 7:09 PM