>I have some Path as
>
>F:\US\Newyork\123.txt
>F:\Canada\otawa\12234.ps
>F:\India\City\Delhi\Noida\1.ps
>
>I want to extract Newyork,Otawa, and Noida from the above Path. I.e the last Directory in whivh the file is located. Is there any function to do so ?
Use nested JUSTSTEM() and JUSTPATH() functions:
? JUSTSTEM(JUSTPATH("F:\US\Newyork\123.txt"))
? JUSTSTEM(JUSTPATH("F:\Canada\otawa\12234.ps"))
? JUSTSTEM(JUSTPATH("F:\India\City\Delhi\Noida\1.ps"))
You'll need some error checking for dealing with root-level directories, and possibly non-standard filenames.