Creating Folder inside Parent with property of document created,uploaded or inserted in ParentFolder
I want to create a Folder in Parent by reading Property from document inserted,created or uploaded in Parent and then move that document to that folder.
I am getting some idea that how it may work like i have to create rule on parent with criteria when item are created or enter this folder, then i have added my property in all criteria met. Now my question is my property is of type d:text and can have upto 6 characters and in the condition it has condition of begins with,equal to,contains, end with . so what should i provide in it.
Also like i have around 1000+ document to be created . so how to create script which will move this document to the folder created on the basis of each document.
Please anyone can guide me on this issue will be great help.
Re: Creating Folder inside Parent with property of document created,uploaded or inserted in ParentFo
Following is an example
// get parent folder of current documnet var parent = document.parent; var year = document.properties["**:name"]; //create var yearFolder = parent.createFolder(uploadDirectory); //move to destinition folder document.move(yearFolder );