I am using the below method to get the file names. But it returns the entire path and I don't want to get the entire path. I want only file names, not the entire path.
How can I get that only file names not the entire path
path= c:docsdocackup-23444444.zip
string[] filenames = Directory.GetFiles(targetdirectory,"backup-*.zip");
foreach (string filename in filenames)
{ }
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…