christer99
IS-IT--Management
- Dec 3, 2001
- 247
How can I read all files in a directory on a local networked drive and then display those files in a listbox (or any solution so user can pick a document). I am using Visual Studio 2003.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Imports System.IO
Dim files As String() = Directory.GetFiles("\\NetworkDriveName\FolderName", "*.*")
For i As Integer = 0 To files.Length - 1
files(i) = files(i).Substring(files(i).LastIndexOf("\") + 1)
Next
listBox1.Items.AddRange(files)