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