Make code more memory efficient, or shorter
The code does not rename any files, it modifies the values of certain variables.

Using assignments as a parameter to your functions is confusing.

You call file_exists but do nothing with it.  It is supposed to be used to check for the existence of a file. Something like:

if (!file_exists($destination))
{
    rename($source, $destination);
}


To answer more you would need to show how the desktop_dir_xxx variables are calculated.