Wednesday 28 August 2013

Remove extensions from ListBox

Remove extensions from ListBox

I have a piece of code that searches for shortcuts and puts them into a
listbox. How ca I modify it in order to display the information without
the .lnk extension
For Each foundFile As String In
My.Computer.FileSystem.GetFiles("Z:\SiteServices\Maintenance\Maintenance
Support Folder\Equipment Specific Information\DES",
Microsoft.VisualBasic.FileIO.SearchOption.SearchTopLevelOnly, "*" &
txtSearch.Text & "*" & ".lnk")
ListBox1.Items.Add(foundFile)
Next

No comments:

Post a Comment