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?
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?