How to interpret ../../directory and construct absolute path? lazarus / 62-General ---------------------------------------------------------------------- stem · 2018-05-04 20:32 Hi, let the variable subdirectory be, for example, "sound", so in my program the filename is put together like: Code: [Select]filename := subdirectory + DirectorySeparator + 'test.mp3'; (relatively to the current directory) How can I support values like "../../sound" for subdirectory, i.e. go two directories up and then go to subdirectory "sound"? Thank you! stem ---------------------------------------------------------------------- engkin · 2018-05-04 23:29 Use ExpandFileName from unit sysutils.