Hi
I have a requirement to rename the file in a folder to match the folder name. I was wondering if anyone here on the forum has any ideas how to accomplish this.
Thanks
Rmarkables
var myString = object("folder");
var pathElements = myString.split('\\');
var lastFolder = pathElements[pathElements.length - 2];
newName = lastFolder;