OpenFileDialog1

  • Thread starter Thread starter Will
  • Start date Start date
W

Will

Hey guys i'm using the OpenFileDialog1.filename.

the problem is that it gives me the full path of the
file, ex:

c:\Program Files\SomeFolder\somepic.gif.

i only need the somepic.gif part,not the full path. what
do i do ?!?!

thanx !
 
* "Will said:
Hey guys i'm using the OpenFileDialog1.filename.

the problem is that it gives me the full path of the
file, ex:

c:\Program Files\SomeFolder\somepic.gif.

i only need the somepic.gif part,not the full path. what
do i do ?!?!

Have a look at the 'System.IO.Path' class and its shared members
('Get*').
 
Will said:
Hey guys i'm using the OpenFileDialog1.filename.

the problem is that it gives me the full path of the
file, ex:

c:\Program Files\SomeFolder\somepic.gif.

i only need the somepic.gif part,not the full path. what
do i do ?!?!


System.IO.Path.GetFileName
 
thats not really what i was looking for, i wanted
something in the OpenFileDialpg1. (a member)
 
* "Will said:
thats not really what i was looking for, i wanted
something in the OpenFileDialpg1. (a member)

\\\
MsgBox(System.IO.Path.GetFileName(OpenFileDialog1.FileName))
///
 
Back
Top