how to get the file name from the file path in c# code example Example: C# get filebase name string name = Path.GetFileName(file);