Sign in to follow this  
Jiia

Cleaning a path

Recommended Posts

Does anyone know of a nice little function that cleans a directory structured path, such as this..
C:\DirA\DirB\..\DirC\..\DirB\DirD\..\..\DirB\X
Which could be cleaned up to
C:\DirA\DirB\X
I know it's as simple as backtracking to the last slash for each ..\, but I would rather use a standard function if such a thing exists? Thanks for help.

Share this post


Link to post
Share on other sites
Ahh, thanks. I'm wondering if this function can use the same string buffer for destination and source. Doesn't say anything in the docs. I would guess that means no.

Very strange that such a simple task requires internet explorer. Microsoft keeps me guessing [evil]

Thanks again.

Share this post


Link to post
Share on other sites
Quote:
Original post by Jiia
...snip...

Very strange that such a simple task requires internet explorer. Microsoft keeps me guessingThanks again.


Yeah, they kept adding a lot of neat stuff using IE to basically update Windows. Thank god they stopped doing that again.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this