filename without path

BlitzMax Forums/BlitzMax Programming/filename without path

Chris C(Posted 2006) [#1]
whats the easiest way of changing ..
/home/someone/soneidr/afilename.jpg
to afilename.jpg

the most elegent easy solution wins the right to pay £1 to charity a prize you cant refuse! :))


N(Posted 2006) [#2]
Local dir$ = "/home/someone/soneidr/afilename.jpg"
dir = StripDir( dir )



CS_TBL(Posted 2006) [#3]
Function StripDir$( path$ )


CS_TBL(Posted 2006) [#4]
argh, lost the prize :S


N(Posted 2006) [#5]
Yep, now I get to pay £1 to a charity :D


Chris C(Posted 2006) [#6]
DUH, i new it was in there somewhere!!

as CS_TBL's solution was of equal skill I have decided to award the first prize to both...

thx guys