12-02-2009 10:06 AM
12-02-2009 11:42 AM
12-03-2009 03:25 AM
12-03-2009 03:55 AM
// Move document to YYYY/MM/DD structure
// First, find or create target folder
var current = document.properties["cm:created"];
var year = current.getFullYear();
var month = current.getMonth() + 1;
var day = current.getDate();
var yearSpace = space.childByNamePath(year);
if (yearSpace == null) {
yearSpace = space.createFolder(year);
}
var monthSpace = yearSpace.childByNamePath(month);
if (monthSpace == null) {
monthSpace = yearSpace.createFolder(month);
}
var daySpace = monthSpace.childByNamePath(day);
if (daySpace == null) {
daySpace = monthSpace.createFolder(day);
}
// Then move document
document.move(daySpace);
Trigger this script with an inbound rule on a given space, and it will automatically create a year/month/date structure in this space.Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.