string filePath = @"c:\MonDossier\MonFichier.ext"; string path = System.IO.Path.GetDirectoryName(filePath); //path = "c:\MonDossier\