Move folder when destination exists

You can’t use “mv” to move a folder if the target folder exists. Instead you can use rsync with the “–remove-source-files” option

rsync folder/path/* new/folder/path --remove-source-files

The folder structure will be left, but the files will be merged.

Leave a Reply

Your email address will not be published. Required fields are marked *