Getting rid of the directory in the file name for metadata.