You could use the GetFileName method to extract only the filename without a path:
string filenameWithoutPath = Path.GetFileName(filename);
You could use the GetFileName method to extract only the filename without a path:
string filenameWithoutPath = Path.GetFileName(filename);