To get the complete list of pdf files under specified directory
Private Sub GetFileList()
Dim dir As New DirectoryInfo("D:\Sai")
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
End Sub
Private Sub GetFileList()
Dim dir As New DirectoryInfo("D:\Sai")
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
End Sub
No comments:
Post a Comment