c# get folder path from filename code example
Example: get directory of file c#
using System.IO;
string file = "C:\Documents\file.txt";
Path.GetDirectoryName(file);
using System.IO;
string file = "C:\Documents\file.txt";
Path.GetDirectoryName(file);