when a path is copied, use the source to determine directory