trim the relative path of files.