Link to home
Start Free TrialLog in
Avatar of RIAS
RIASFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Get Foldername

Hi,
How can i get the foldername from a path.

Cheers
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

USe the GetDirectoryName function.
folderName = GetDirectoryName(path)

https://msdn.microsoft.com/en-us/library/system.io.path.getdirectoryname(v=vs.110).aspx
Avatar of RIAS

ASKER

Thanks Andy,
It gave me the path and truncated the foldername.
Can you post the path you are using please.
Avatar of RIAS

ASKER

\\network\root\ABC\DEP\FOLDER1\FOLDER2
need to retrieve:

FOLDER2
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RIAS

ASKER

Thanks