How to use sub string method in this condition?
=>C:\Users\A001\Foldername\filename
I want only folder name.How can I do this??
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Tom MohanPosted Apr 20, 2015, 9:22 AM
Tom MohanPosted Apr 22, 2015, 1:14 AM
Asp.Net HeinPosted Apr 21, 2015, 9:18 PM
I will need more help from u later.
:-)
Tom MohanPosted Apr 21, 2015, 10:39 AM
I believe you got the solution .
Gowtham RajamanickamPosted Apr 20, 2015, 4:11 AM
Khargesh RajputPosted Apr 20, 2015, 4:09 AM
Vikram AgrawalPosted Apr 20, 2015, 3:27 AM
Hi Soe,
Are you getting this path as a string?
Asp.Net HeinPosted Apr 20, 2015, 2:36 AM
Tom MohanPosted Apr 20, 2015, 2:25 AM
try this
FileInfo fInfo = new FileInfo(@"D:\AD\folder1\abc.txt"); String dirName = fInfo.Directory.Name;
Here I'm getting name folder1 in dirname;