Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Thanks gents. Big help. Actually David you solved my major problem on this issue with the provideo coalition tutorials.
Here is the script I ultimately wound up writing. Le me know if you think I should have done something different.
var d = new Date ();
var nnum = d.getDate();
var mnum = d.getMonth() + 1;
var ynum = d.getFullYear();
var n = nnum.toString();
var m = mnum.toString();
var y = ynum.toString();
if (mnum <= 9) {
m = "0" + m
}
if (nnum <= 9) {
n = "0" + n
}
// y = y.slice(2);
//change your date format here
var writeDate = m+n+y;
var proj = app.project;
var myRQ = proj.renderQueue;
var numOM, oldName;
var path = "";
var fileExt =""
for(var i = 1; i <= myRQ.numItems; i++) {
if(app.project.renderQueue.item(i).status == 2615){
oldName = myRQ.item(i).outputModule(1).file.name;
fileExt = oldName.slice(oldName.length - 4)
oldName = oldName.substring(0, oldName.length - 4);
newName = oldName + "_" + writeDate;
path = myRQ.item(i).outputModule(1).file.path;
myRQ.item(i).outputModule(1).file = new File(path + "/" + newName + fileExt);
numOM = myRQ.item(i).outputModules.length;
if(numOM > 1){
for(var o = 2; o <= numOM; o++){
oldName = myRQ.item(i).outputModule(o).file.name;
fileExt = oldName.slice(oldName.length - 4)
oldName = oldName.substring(0, oldName.length - 4);
newName = oldName + "_" + writeDate;
path = myRQ.item(i).outputModule(o).file.path;
myRQ.item(i).outputModule(o).file = new File(path + "/" + newName + fileExt);
}
}
}
}
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more