The following is checking for any folder in the path that is more than 1 day old and matches the name criteria. If found, the folder is then moved to the 'trash' folder.
find /Users/myname/Desktop/backups/websites/testwebsite.co.uk -maxdepth 1 -type d -mtime +1 -name '[0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]' -exec mv {} /Users/myname/Desktop/backups/trash \;
I need to modify the foldername, to include '_renamed' at the end.
I thought that I could use the curly braces from mv, but now realise this takes the full folder path as well.
find /Users/myname/Desktop/backups/websites/testwebsite.co.uk -maxdepth 1 -type d -mtime +1 -name '[0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]' -exec mv {} /Users/myname/Desktop/backups/trash/{}_renamed \;
Is there any way that I can modify the folder path without copying the path as well?