How to loop thru all the files in a folder ?

  • Thread starter Thread starter fniles
  • Start date Start date
F

fniles

I would like to loop thru all the files in a folder. For ex: I have a folder
c:\temp and inside that folder there are many zip files. I want to read each
zip files in c:\temp.
How can I do that ?
Thank you.
 
I would like to loop thru all the files in a folder. For ex: I have a folder
c:\temp and inside that folder there are many zip files. I want to read each
zip files in c:\temp.
How can I do that ?
Thank you.

Something like:

for each file as System.IO.File in System.IO.Directory.GetFiles("C:
\temp", "*.zip")
' Do Something
end for

Thanks,

Seth Rowe
 
rowe_newsgroups said:
Something like:

for each file as System.IO.File in System.IO.Directory.GetFiles("C:
\temp", "*.zip")
' Do Something
end for


\\\
Imports System.IO
....
For Each FileName As String In Directory.GetFiles("C:\temp", "*.zip")

Next FileName
///
 
Back
Top