'use as MsgBox HaalBestandNaam("c:\windows\win.com","\") 'gives you 'win.com' MsgBox HaalBestandNaam("d:/data/backup.txt","/") 'gives you 'backup.txt' 'last example I needed for conencting to some unix-systems Function HaalBestandNaam(bron$, vSlash$)Returnas
Stringdim
p% HaalBestandNaam = bron For p% = Len(bron$) To 0step
-1 If Mid$(bron$, p%, 1) = vSlash$ Then HaalBestandNaam = Mid$(bron$, p% + 1, Len(bron$) - p% + 1)exit
Functionend
If Next p% End Function