473,394 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

OpenFileDialog1


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 !
Nov 20 '05 #1
4 4259
* "Will" <an*******@discussions.microsoft.com> scripsit:
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*').

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
thats not really what i was looking for, i wanted
something in the OpenFileDialpg1. (a member)
-----Original Message-----
* "Will" <an*******@discussions.microsoft.com> scripsit:
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*').

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
.


Nov 20 '05 #3
"Will" <an*******@discussions.microsoft.com> schrieb

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
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4
* "Will" <an*******@discussions.microsoft.com> scripsit:
thats not really what i was looking for, i wanted
something in the OpenFileDialpg1. (a member)


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

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: michael haller | last post by:
In my project i have a textfile witch i import in my c# application. The datas in the textfile i show the datas in the textfile in my datagrid..ok that ist not my problem. Now i have a...
4
by: Noa | last post by:
Hi, Is there a way to use OpenFileDialog1 in order to multi-select folders? I saw in msdn site a sample of multi-file-selections. I need to select multiple folders and to apply an algorithm on...
6
by: cj | last post by:
Lets just take this example I'm looking at now. I'm looking at the help screen titled .NET Framework Class Library FolderBrowserDialog Class . It gives an example at the bottom that begins with:...
6
by: Mike | last post by:
Hello all, I'm trying to work with the openfiledialog and being new to vb and vb.net I'm having some problems. Wherever I have Me.OpenFileDialog1 I keep getting the following error: C:\Visual...
7
by: garyusenet | last post by:
This is the first time i've worked with openfile dialog. I'm getting a couple of errors with my very basic code. Can someone point out the errors in what i've done please....
0
by: Bomac8 | last post by:
I have a text file with "|" as a delimeter with three (3) fields XXX-12345|\\YYYYYYY|\\ZZZZZZZZ I need to read these files into an output folder. The problem that I'm having is that I need to...
6
by: johnlarson | last post by:
I am using an openfiledialoge to open a dbf file in a windows app. the error I get is c:\myfile.dbf not an valid filename. here is my code private void button1_Click ( object sender , EventArgs e...
1
by: liwaste | last post by:
hi.. I am trying to read a textfile nd store it in a dataset.. so tht i can move it to a database later my file looks like this climate,Soil,lutype,area TRD,HAM,CRO,14.54 TRD,HAM,CRO,0.01...
2
by: senthiltr86 | last post by:
hai i am senthil.i am using visual studio 2005 .i want to open the file open window when i click the browse button.can you please tell me how it is happen?.thank you.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.