c# get filename code example
Example 1: c# get directory name from filename
Path.GetDirectoryName(filename);
Example 2: C# get filebase name
string name = Path.GetFileName(file);
Path.GetDirectoryName(filename);
string name = Path.GetFileName(file);