Getting the folder name from a full filename path

string path = "C:\folder1\folder2\file.txt";

What objects or methods could I use that would give me a result of folder2?

10 Answers
10

Leave a Comment