Click here to Skip to main content
15,896,154 members
Articles / Programming Languages / Visual Basic

How to get File Name from Full file Path

Rate me:
Please Sign up or sign in to vote.
3.44/5 (15 votes)
14 Jul 2010CPOL 29.7K   4  
File Name from Path

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
14 Jul 2010Simon_Whale
imports system.iodim Filename as string = "C:\Users\Sony\Desktop\Readme.txt"dim FileInfo as new fileinfo(filename)'this gets the filename and extension e.g. readme.txtmessagebox.show (Fileinfo.name)'this gets the extensionmessagebox.show (Fileinfo.extension)'this gets the...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions