Path Manipulation Routines: GetRelativePath and GetCompact Path
Category:Files and Directories
Routines for path manipulation using the shlwapi.dll type library that comes with Internet Explorer. Comes complete with a demo client program:
- GetRelativePath demonstrates when given a directory path and a file path how to return the relative path from the directory to the file.
- GetCompactPath demonstartes how to compact a long path name down into a small space in order to display it effectively in, say, a small text box.
Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.