Would anybody know how to do this:
I'm making a program that allows the user to select an initial directory so that when the program starts up again next time they use it the default folder for saving will be the one in the txt file. For example.
@"C:\Program Files\Steam\SteamApps\<username>@<emaildomain>\cou nter-strike\hl.exe";
so what this does is they browse the the hl.exe file and then it saves the Path.GetDirectoryName() of it, but what i really want is i want it to save only the path to the <username>@<emaildoamin>and no subdirectories afterward, so that the text file would look like this:
since the folder varies throughout users and there are no files in <username>@<emaildomain>, only folders.
so as a summary i just want the user to be able to browse to hl.exe and then have the path go backwards two folders.