Well yes.. Sort of like if i was to choose a file from C:\Users\Ahmed.C\Documents\Anno 1404\Savegames it will only be like "C:\Users\Ahmed.C\Documents\Anno 1404\Savegames" and not like C:\Users\Ahmed.C\Documents\Anno 1404\Savegames\chosesnfile.ini"
But how would I make it such that when i open a certain file from a directory, the textbox text should be C:\Users\Ahmed.C\Documents\Anno 1404\Savegames and not C:\Users\Ahmed.C\Documents\Anno 1404\Savegames\chosenfile.ini ?
I dont know whether there are any inbuilt options,but, I will give you the algorithm to your problem and you should code it probably. If any doubts in your code,Kindly post the code so that we can help further.
First store the path in a string
count the "\" in the string(path).
Loop with the condition to find the the "\" in the string.
so parse the string, If a "\" is encountered, Save the string in a temp variable.
Then repeat the process until count is equal to the value, count=count-1;
if count=count-1, print the temp variable data. It will be your necessary output.