Cephalexin is a generic prescription drug that treats infections. Only the oral capsule comes in a brand-name version called Keflex. Cephalexin can ... drug to treat your C. diff infection.