Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Get Last Directory Name
Message
 
To
19/03/2013 14:24:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01568796
Message ID:
01568798
Views:
74
>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 ?
DIMENSION laPaths[3]
laPaths[1] = "F:\US\Newyork\123.txt"
laPaths[2] = "F:\Canada\otawa\12234.ps"
laPaths[3] = "F:\India\City\Delhi\Noida\1.ps"

FOR lnFor = 1 TO 3
    ? JUSTFNAME(JUSTPATH(laPaths[lnFor]))
NEXT
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform