right here it goes..
I got a listbox called programlist which gets selected item to string. I do this so i can capture the location of a file and the file name. I am so confused and I have googled around and whatnot but I have found nothing to do with this method anywhere on the net.
And this is already where i am stuck because I have NO IDEA how to get the filename to a string which will need trimming. for example, if I have a location of C:\\SomeProgram\Here\my.exe
All I want from the above is "My". Can anyone explain the best way to do this, as it suddenly got very difficult when i started working with the fileinfo bit. :D or am i going about this all wrong? I can not change anything with the Listbox, as that is importing info into a file.... Does it make sense what I am doing or do you guys need more info?
Appreciate any help on this.
I got a listbox called programlist which gets selected item to string. I do this so i can capture the location of a file and the file name. I am so confused and I have googled around and whatnot but I have found nothing to do with this method anywhere on the net.
Code:
Dim Program As New FileInfo(ProgramList.SelectedItem.ToString) 'that returns the filename...All I want from the above is "My". Can anyone explain the best way to do this, as it suddenly got very difficult when i started working with the fileinfo bit. :D or am i going about this all wrong? I can not change anything with the Listbox, as that is importing info into a file.... Does it make sense what I am doing or do you guys need more info?
Appreciate any help on this.