Home  |  Programs  |  Tips & Tricks  |  Subs & Functions  |  Links  |  Laz's Liberty Basic Site


GetPath Function

Call the function like this:
Path$ = GetPath$(CompletPath)


function GetPath$(FName$)
'Get the path from a complete path (strip the file name)
S$ = "null"
leng = len(FName$)
while right$(S$,1) <> "\" and leng <> 0
S$ = left$(FName$,leng)
leng = leng - 1
wend
if leng = 0 then
GetPath$ = FName$
else
GetPath$ = S$
end if
end function

Hosted by www.Geocities.ws

1