[Help] Extract Filename From Listbox[Solved]
I need help extracting the filename from an item on a listbox
Code:
Ex. C:\Documents and Settings\User\My Documents\Test.txt
i want to extract the "Test.txt" into a second listbox any ideas?

"Extract"?
Listbox2.items.add (Listbox1.Items.indexof(0))
Something like that, amirite?
i tried the code, but all it gave me in return was an integer D:
Listbox2.Items.Add(ListBox1.Items(0).Substring(Lis tbox1.Items.LastIndexOf("\")))
Yeah it would only return an integer, seeing as all he did was search for the index of an integer, which your ListBox may not even contain.
Try something like this.
[php]
For each lbItem As String in ListBox1.Items
ListBox2.Items.Add(IO.Path.GetFileName(lbItem))
Next
[/php]