🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
3 messages
3 total messages Started by Jeff Douglass Tue, 25 Mar 2003 03:06
Function to get parent director?
#17453
Author: Jeff Douglass
Date: Tue, 25 Mar 2003 03:06
8 lines
1167 bytes
Is there an api or VCL function to return the parent directory of a given
path? For example, given "c:\\dir1\\dir2\\dir3\\dir4" is there a fucntion
that would return "c:\\dir1\\dir2\\dir3"? Basically reverse parse the
hierarchy directory structure.

thanks for any info.

Jeff
Re: Function to get parent director?
#17454
Author: Remy Lebeau (TeamB)
Date: Tue, 25 Mar 2003 03:39
11 lines
1361 bytes
ExtractFilePath(), as long as the path doesn't have a trailing backslash on
it.  If it does, then you'll have to strip it off first.


Gambit

"Jeff Douglass" <.> wrote in message
news:3e7fc95d$1@newsgroups.borland.com...
> Is there an api or VCL function to return the parent directory
> of a given path? For example, given "c:\\dir1\\dir2\\dir3\\dir4"
> is there a fucntion that would return "c:\\dir1\\dir2\\dir3"?
Re: Function to get parent director?
#17456
Author: Jeff Douglass
Date: Tue, 25 Mar 2003 03:46
3 lines
956 bytes
That did the trick. Thanks again.

Jeff
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads