When I use the line of code as below , I get an string array containing the entire path of the individual files .
private string[] pdfFiles = Directory.GetFiles("C:\Documents", "*.pdf");
I would like to know if there is a way to only retrieve the file names in the strings rather than the entire paths.
See Question&Answers more detail:os