AnsweredAssumed Answered

Replace part of an existing file name

Question asked by kevin33 on Apr 19, 2016
thanks to this forum I successfully adapted to my needs a simple script for ranaming files that are uploaded through a folder rule

var folderName =;
var folderName1 =;
//var docName =;
var date = new Date();
var timeInMillisecs = date.getTime();
var ISODate = timeInMillisecs; = folderName + " " + folderName1 + " " + timeInMillisecs;

I have this script in various folders to achive the desired change in name.

Now I have the problem that the foldername in future could change name so I would have the files already uploaded with "wrong" (old foldername name) names.
So I think I would need something that check the name of the newly renamed folderName and that for every existing file in folder renames just the part of the folderName of the exsisting files, keeping the rest of the name the same.
Is that possible? thst's outside my area of expertise.
Thanks in advance.