Getting Filename, not whole path

Basseman

Member
Licensed User
Hi, im using the opendialog and want to show in a label the name of the file i have opend.

Label1.text = Opendialog.File shows the entire path

Label1.text= Opendialog.Text doesnt show anything.

How to do ??

Thanx:sign0085:
 

digitaldon37

Active Member
Licensed User
Longtime User
Hi, im using the opendialog and want to show in a label the name of the file i have opend.

Label1.text = Opendialog.File shows the entire path

Label1.text= Opendialog.Text doesnt show anything.

How to do ??

Thanx:sign0085:

Filename

Returns the file name without the path.
Syntax: FileName (File)
Example: Name = FileName (OpenDialog1.File)
 
Top