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.
Envoi ton script!
//add a folder "Archives" where it is needed and create a logAddArchives.txt file in the "root" space var logFile = space.childByNamePath("logAddArchives.txt"); if (logFile == null) { logFile = space.createFile("logAddArchives.txt"); } if (logFile != null) { logFile.content += "'Archives' folders added in: \n" } addArchive(space); if (logFile != null) { logFile.content += "Done \n" } function addArchive(unEspace) { var unEspacefils = unEspace.children; var draft = 0; for each (i in unEspacefils) { var nom = i.name; if (nom == "Drafts") { draft = 1; } } if (draft == 1 ) { var archiveFolder = unEspace.childByNamePath("Archives"); if (archiveFolder == null && unEspace.hasPermission("CreateChildren")) { archiveFolder = unEspace.createFolder("Archives"); if (logFile != null) {logFile.content += String(i.displayPath)+"\n"; } } } for each (j in unEspacefils) { if (j != null) { addArchive(j); } } }