Avatar

Community Advisor

Hi ,

Can you please add below function and try if it's works. I am using this function to rename my csv file using JS script in workflow and it's working fine for me. 

 

function test(oldName,newName)

{

try

{

var temp= new File(oldName);

temp.renameTo(newName);

}

catch(e)

logInfo("error " + e)

}

}