read path from folder c# code example Example: c# get folder path from file path Path.GetDirectoryName(filename);