VB.NET string manipulation

Associate
Joined
12 Mar 2005
Posts
2,021
Location
Scotland
Im sure this can be done easily but i cant get it just now.

I have a string var1 which is a full file path e.g. "C:\Windows\System32\calc.exe"

From this I want to extract "C:\Windows\System32\" and "calc.exe" i.e. split the full string into actual path and file. I can get the file name ok by splitting on "\" and taking the last of the array. But stuck on sticking only the (array - 1) back together. Sure this should be easy and im just missing the obvious, but thats the problem i give to you :)


Any ideas on how i would do this?
 
thanks for the quick reply :) thats that bit sorted now. Just to make it work how i want now....

cheers again

Update edit: All working how i want it now, thanks for your help on the file path/names, was really beginning to get at me.
 
Last edited:
Back
Top Bottom