Is there an API to return parent directory
-
Hi All, Say if i give, C:\\Level 1\\Level 2\\abc.txt, the return value i'm expecting is C:\\Level 1\\Level 2. Is there an API to return the parent directory from the given path, something like PathFindFileName API, or we should extract on our own. Thanx.
Do your Duty and Don't expect the Result
-
Hi All, Say if i give, C:\\Level 1\\Level 2\\abc.txt, the return value i'm expecting is C:\\Level 1\\Level 2. Is there an API to return the parent directory from the given path, something like PathFindFileName API, or we should extract on our own. Thanx.
Do your Duty and Don't expect the Result
If you're given a full pathname, just get rid of everything after the last \\ :) Regards, --Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia Introduction to Object-Oriented JavaScript
-
Hi All, Say if i give, C:\\Level 1\\Level 2\\abc.txt, the return value i'm expecting is C:\\Level 1\\Level 2. Is there an API to return the parent directory from the given path, something like PathFindFileName API, or we should extract on our own. Thanx.
Do your Duty and Don't expect the Result
The API is ( it will remove the last level ) ::PathRemoveFileSpec(buffer); if you use .net then you can use Directory.GetParent Method http://msdn.microsoft.com/en-us/library/system.io.directory.getparent(VS.71).aspx[^]
Vikas Amin
My First Article on CP" Virtual Serial Port "[^]
modified on Thursday, July 24, 2008 5:33 PM
-
The API is ( it will remove the last level ) ::PathRemoveFileSpec(buffer); if you use .net then you can use Directory.GetParent Method http://msdn.microsoft.com/en-us/library/system.io.directory.getparent(VS.71).aspx[^]
Vikas Amin
My First Article on CP" Virtual Serial Port "[^]
modified on Thursday, July 24, 2008 5:33 PM
thanx.. i'm looking for this API..
Do your Duty and Don't expect the Result
-
thanx.. i'm looking for this API..
Do your Duty and Don't expect the Result
welcome , glad it was helpfull
Vikas Amin
My First Article on CP" Virtual Serial Port "[^]
modified on Thursday, July 24, 2008 5:33 PM