| [Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | 
Extract a relative path from a filename, given a base directory.
Source position: finah.inc line 32
| function ExtractRelativepath( | 
| const BaseName: UnicodeString; | 
| const DestNAme: UnicodeString | 
| ):UnicodeString; | 
| const BaseName: RawByteString; | 
| const DestNAme: RawByteString | 
None.
| 
 | Extract the filename part from a full path filename. | |
| 
 | Extract the path from a filename. | |
| 
 | Extract the drive and directory part of a filename. | |
| 
 | Extract the drive part from a filename. | |
| 
 | Return the extension from a filename. | 
Program Example35; { This program demonstrates the ExtractRelativePath function } Uses sysutils; Procedure Testit (FromDir,ToDir : String); begin Write ('From "',FromDir,'" to "',ToDir,'" via "'); Writeln (ExtractRelativePath(FromDir,ToDir),'"'); end; Begin Testit ('/pp/src/compiler','/pp/bin/win32/ppc386'); Testit ('/pp/bin/win32/ppc386','/pp/src/compiler'); Testit ('e:/pp/bin/win32/ppc386','d:/pp/src/compiler'); Testit ('e:\pp\bin\win32\ppc386','d:\pp\src\compiler'); End.