As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
var aleatorio = Math.floor(Math.random()*101) var fichero = document.properties.name; var fichero2 = space.childByNamePath(fichero); if(fichero2 != null){ document.name = aleatorio+"_"+fichero; }
var fichero = document.properties.name;
// find the backup folder - create if not already exists var backupFolder = space.childByNamePath("Backup"); if (backupFolder == null && space.hasPermission("CreateChildren")) { // create the folder for the first time backupFolder = space.createFolder("Backup"); } if (backupFolder != null && backupFolder.hasPermission("CreateChildren")) { // copy the doc into the backup folder var copy = document.copy(backupFolder); if (copy != null) { // change the name so we know it's a backup copy.name = "Backup of " + copy.name; copy.save(); } }