OK, assuming the underscore is used as a delimiter, then the following should parse out the customer and contact names regardless of whether the underscore is surrounded by spaces or not:
using System;
using System.IO;
class Test
{
static void Main()
{
string filePath = @"C:\app1\12_2012\customer name _ contact name.xls";
string temp = Path.GetFileNameWithoutExtension(filePath);
string[] names = temp.Split('_');
string customerName = names[0].TrimEnd();
string contactName = names[1].TrimStart();
Console.WriteLine("Customer = '{0}'", customerName);
Console.WriteLine("Contact = '{0}'", contactName);
Console.ReadKey();
}
}