How to get the file names in a directory
-
hi, use following statements for get files from particular directory
If Directory.Exists(Application.StartupPath & "\ABC") Then Dim ob As New DirectoryInfo(Application.StartupPath & "\ABC") Dim file_infos() As FileInfo file_infos = ob.GetFiles() For Each file_info As FileInfo In file_infos Listbox1.Items.Add(file_info.FullName) Next file_info End If
hope this helpsRupesh Kumar Swami Software Developer, Integrated Solution, Bikaner (India) My Company Award: Best VB.NET article of June 2008: Create Column Charts Using OWC11
-
hi, use following statements for get files from particular directory
If Directory.Exists(Application.StartupPath & "\ABC") Then Dim ob As New DirectoryInfo(Application.StartupPath & "\ABC") Dim file_infos() As FileInfo file_infos = ob.GetFiles() For Each file_info As FileInfo In file_infos Listbox1.Items.Add(file_info.FullName) Next file_info End If
hope this helpsRupesh Kumar Swami Software Developer, Integrated Solution, Bikaner (India) My Company Award: Best VB.NET article of June 2008: Create Column Charts Using OWC11