Hello Folks
How to rename the file before installing the addon at Sugar on Demand.
And Also Rebuild JS Grouping Files using coding.
I have tried using $uploadFile->duplicate_file But not working.
require_once('include/utils/autoloader.php');
require_once('include/upload_file.php');
if (SugarAutoloader::fileExists("custom/modules/EmailTemplates/DetailView.html"))
{
echo "Yes";
$uploadFile = new UploadFile();
$file = "custom/modules/EmailTemplates/DetailView.html";
$newfile = 'custom/modules/EmailTemplates/DetailView_bkp_'.time().'.html';
$uploadFile->duplicate_file($file, $newfile);
}else
{
echo "No";
}
Please let me know how i can do ?