[quoted text, click to view] Mike W wrote:
> I have :a friend: who needs to extract a filename from a variable
> path_filename.
> The path/filename combo is stored in a string and is different each time.
>
> Something like
>
> strFile = txtPathFile.text 'were the txtPathFile textbox is populated with
> c:\windows\win.com
>
> what is the most straight forward way to pull win.com out and place into
> another string like strFile?
>
> I really appreciate...I mean, my friend really appreciates the help. ;-)
>
> Thanks,
> m
>
>
use indexof and substring
Dim BackSlash as Integer= FullPath.LastIndexOf("\")
FileName = FullPath.Substring((BackSlash + 1), FullPath.Length -