chickadee » files » pathname-replace-file

(pathname-replace-directory PATHNAME DIRECTORY) procedure
(pathname-replace-file PATHNAME FILENAME) procedure
(pathname-replace-extension PATHNAME EXTENSION) procedure

Return a new pathname with the specified component of PATHNAME replaced by a new value.