473,387 Members | 1,463 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,387 software developers and data experts.

get folder-path from file-path

I don't find .net lib method to return the folder-path of a file-path.

I'm probably not looking hard enough ... I've checked the
System.IO.File,Path,Directory libs
Oct 28 '08 #1
5 9108
On Tue, 28 Oct 2008 12:16:59 -0700, John A Grandy
<johnagrandy-at-gmail-dot-comwrote:
I don't find .net lib method to return the folder-path of a file-path.

I'm probably not looking hard enough ... I've checked the
System.IO.File,Path,Directory libs
Well, either you simply missed the relevant method on the Path class
(GetDirectoryName()), or your question doesn't mean what it looks like it
means. :)
Oct 28 '08 #2
On Tue, 28 Oct 2008 12:16:59 -0700, "John A Grandy"
<johnagrandy-at-gmail-dot-comwrote:
>I don't find .net lib method to return the folder-path of a file-path.

I'm probably not looking hard enough ... I've checked the
System.IO.File,Path,Directory libs
Look at the FileInfo class.
Oct 28 '08 #3
its easier to use the Path members,
Carlos.

"Joe Cool" <jo*****@home.netwrote in message news:4t********************************@4ax.com...
On Tue, 28 Oct 2008 12:16:59 -0700, "John A Grandy"
<johnagrandy-at-gmail-dot-comwrote:
I don't find .net lib method to return the folder-path of a file-path.

I'm probably not looking hard enough ... I've checked the
System.IO.File,Path,Directory libs

Look at the FileInfo class.

Oct 29 '08 #4
On Wed, 29 Oct 2008 07:28:51 -0300, "xcal" <a@a.comwrote:
>its easier to use the Path members,
Path members?
Carlos.

"Joe Cool" <jo*****@home.netwrote in message news:4t********************************@4ax.com...
>On Tue, 28 Oct 2008 12:16:59 -0700, "John A Grandy"
<johnagrandy-at-gmail-dot-comwrote:
>I don't find .net lib method to return the folder-path of a file-path.

I'm probably not looking hard enough ... I've checked the
System.IO.File,Path,Directory libs

Look at the FileInfo class.
Oct 29 '08 #5
System.IO

Path.GetFileName();
Path.GetDirectoryName();
Path.GetExtension();

etc, etc,

"Joe Cool" <jo*****@home.netwrote in message news:28********************************@4ax.com...
On Wed, 29 Oct 2008 07:28:51 -0300, "xcal" <a@a.comwrote:
its easier to use the Path members,

Path members?
Carlos.

"Joe Cool" <jo*****@home.netwrote in message
news:4t********************************@4ax.com...
On Tue, 28 Oct 2008 12:16:59 -0700, "John A Grandy"
<johnagrandy-at-gmail-dot-comwrote:

I don't find .net lib method to return the folder-path of a file-path.

I'm probably not looking hard enough ... I've checked the
System.IO.File,Path,Directory libs


Look at the FileInfo class.

Oct 30 '08 #6

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

Similar topics

1
by: Craig Keightley | last post by:
I am trying to write a function to copy an existing folder and folder structure but am already stuck. What I want to do is the following: Copy a default folder (default_folder) and all sub...
0
by: John H. | last post by:
In effort to understand (Outlook) MAPI folder tree structure wrote simple linear code below to navigate tree. Successive "...Folders.GetNext()"'s return same folder at all levels of tree. What...
4
by: Dave Veeneman | last post by:
I'm puzzling over the best design for a Folder object. I have two basic domain objects; leat's call them an Apple and an Orange. The objects are maintained in separate hierarchies, and each...
4
by: mike | last post by:
i wonder if bin folder still use in asp.net 2.0 when i migration website for 1.1 how sholud i do? i guess complier would make 2 dll another folder one is bin folder and the other is...
5
by: Richard J Foster | last post by:
Hi there, I have a pair of C# projects in VS2003. The first project, a dll, is referenced in the second via a project reference. The assemblies in question are delay-signed during a...
4
by: Zeb | last post by:
Hi I'm using DirectoryInfo.Delete so that when a product is removed, all it's associated images (including the folder they sit in) are deleted. This actually seems to work fine. However, the...
0
by: 1333 | last post by:
I need to create a new folder every time the upload folder has 10 files uploaded to it. So when folder1 has 10 files, folder2 is created and becomes the upload folder, and when it has 10 files...
24
by: biganthony via AccessMonster.com | last post by:
Hi, I have the following code to select a folder and then delete it. I keep getting a Path/File error on the line that deletes the actual folder. The line before that line deletes the files in...
1
by: =?Utf-8?B?d2lubGlu?= | last post by:
Hello 1)When using VS 2005 and VB.net when wouldn't the: reference folder, bin folder, obj folder not be present after creating a VB net Windows Application and only the form1.vb and MyProject...
2
by: swethak | last post by:
hi, i want to copy the contents of one folder into another folder.For that i create the one new folder . I copied the files of already existing folder into new folder.For that i write a code as...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.