Code:
function archiveCopy() {
var file= DriveApp.getFileById("");
var destination= DriveApp.getFolderById("");
var timeZone=Session.getScriptTimeZone();
var formattedDate= Utilities.formatDate(new Date(),timeZone,"yyyy-MM-dd' 'HH:mm:ss");
var name= SpreadsheetApp.getActiveSpreadsheet().getName()+"Copy"+formattedDate;
file.makeCopy(name,destination);
}
Brand new to scripting...I've been trying to do this for a few hours without actual success due to older information, etc. Your tutorial helped me immediately and was the most succinct and easy to follow I have found. THANK YOU!
ReplyDeleteHello it doens't work...could you help me ? Panicaiulian.ditu@gmail.com is my email... or 0040740852956 - i'm willing to pay
ReplyDeletefile.makeCopy(name,destination) isn't a function. How to fix that?
ReplyDeleteHow to delete more than a week old files from backup folder? while backup files piling up with new.
ReplyDelete