Click here to Skip to main content
15,894,896 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.
4.00/5 (1 vote)
14 Jul 2010CPOL 80.5K   2  
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...

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 2010Koshy Panicker John 1 alternative  
File Name from Path

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)
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions