to get the file list in a folder using asp.net,
use the following code block
Dim dir As New DirectoryInfo("D:\foldername")
Dim dirinfo As FileInfo() = dir.GetFiles("*.pdf")
Dim FileName As FileInfo
Dim path As String
If dir.Exists = True Then
For Each FileName In dirinfo
path = dir.FullName & "\" & FileName.ToString
'do something
Next
End If
use the following code block
Dim dir As New DirectoryInfo("D:\foldername")
Dim dirinfo As FileInfo() = dir.GetFiles("*.pdf")
Dim FileName As FileInfo
Dim path As String
If dir.Exists = True Then
For Each FileName In dirinfo
path = dir.FullName & "\" & FileName.ToString
'do something
Next
End If
No comments:
Post a Comment