Click here to Skip to main content
15,888,521 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.4K   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...

Views

Daily Counts

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