i want to split those files means filenames and path.could you please tell me how to do that
IEnumerable
IEnumerable files ,in this i have two files
i want to split those files means filenames and path.could you please tell me how to do that
i want to split those files means filenames and path.could you please tell me how to do that
Sasi ReddyPosted Oct 24, 2013, 9:02 AM
VulpesPosted Oct 24, 2013, 8:27 AM
string[] directoryNames = new string[2];
string[] fileNames = new string[2];
for(int i = 0; i < 2; i++)
{
string filePath = files.ToArray()[i].FileName:
fileNames[i] = System.IO.Path.GetFileName(filePath);
directoryNames[i] = System.IO.Path.GetDirectoryName(filePath);
}