hi, i like to ask if there anyway that i can get the filename from openfiledialog. I just want the filename and not the all pathway.
Below is the coding i have done.
openFileDialog.showDialog();
textfile = openFileDialog.FileName;
but this will give me the pathway of the file
e.g. (C:\Documents and Settings\Annicia\Desktop\annicia\SQL Server.exe) but i only want the filename (SQL Server.exe).
If there anyway i can do it as i am quite new to c# can guide me along, thank.
How to retrieve the filename from openfiledialog
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Gary Parkin3 reputationPosted Sep 12, 2005, 7:25 AM EDT
lekkie aydot3 reputationPosted Sep 12, 2005, 8:45 AM EDT