I use this code to show only files with a certain extension in a Listbox.
Dim files() As String = IO.Directory.GetFiles("c:\MyApp", "*.swf"
Dim file As String
For Each file In files
Me.ListBox1.Items.Add(file)
Next
This gives me the Files shown as:
C:\MyApp\myFile1.swf
C:\MyApp\myFile2.swf
...
But now I want to edit only the filenames, without Path and extension, like:
MyFile1
MyFile2
...
Can anyone give me a hint?
Dim files() As String = IO.Directory.GetFiles("c:\MyApp", "*.swf"
Dim file As String
For Each file In files
Me.ListBox1.Items.Add(file)
Next
This gives me the Files shown as:
C:\MyApp\myFile1.swf
C:\MyApp\myFile2.swf
...
But now I want to edit only the filenames, without Path and extension, like:
MyFile1
MyFile2
...
Can anyone give me a hint?