'Rename folder to two destination folders on SFTP server with PHP

This function is working and move folders from mainfolder to one folder called destinationfolder1. I want to move the folders to one other folder also. Folder called backup, what is in the same place/level as destinationfolder1. Is this possible?

ssh2_sftp_rename($sftp, 'mainfolder/' . $entry  , 'destinationfolder1/' . $entry );


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source