You can't get "the containing folder" from a file, but since you know the path to the file - or you should if you want to open or read it - you can use that path to access the folder name:
string path = @"C:\Working data\files\MyFile.txt";
string filenameOnly = Path.GetFileName(path);
string pathWithoutFilename = Path.GetDirectoryName(path);
string justTheFoldername = pathWithoutFilename.Substring(pathWithoutFilename.LastIndexOf('\\') + 1);
Debug.WriteLine(path);
Debug.WriteLine(filenameOnly);
Debug.WriteLine(pathWithoutFilename);
Debug.WriteLine(justTheFoldername);
Will give you:
C:\Working data\files\MyFile.txt
MyFile.txt
C:\Working data\files
files
If you don't use a path when you access a file, then you need to rethink your whole approach:
Where should I store my data?[
^] should help.