SyntaxFix
Write A Post
Hire A Developer
Questions
Use GetParent() as shown, works nicely. Add error checking as you need.
GetParent()
var fn = openFileDialogSapTable.FileName; var currentPath = Path.GetFullPath( fn ); currentPath = Directory.GetParent(currentPath).FullName;