fileName

  • Thread starter Thread starter Hrcko
  • Start date Start date
H

Hrcko

How can I read just the name of the file?

When I put fileName=openFileDialog.FileName I get the full path, but I just
want the name of the file.

Hrcko
 
do a string slipt on the # - the last item in the array is the filename

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 
Hrcko said:
How can I read just the name of the file?

When I put fileName=openFileDialog.FileName I get the full path, but I just
want the name of the file.

Use Path.GetFileName (openFileDialog.FileName)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top