cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically attribute a propriety value

vincent_roye
Champ in-the-making
Champ in-the-making
Hi,

I would like to create a rule or a behaviour for the following scenario :
- Considering that the file is named 1234.pdf
- Every time a PDF file is added to the folder, the value of the property changes to 1234 (the filename without its extension)

What could be the simplest way to do it ? I have already created my type and aspect.

Thanks,

Vincent
2 REPLIES 2

rjohnson
Star Contributor
Star Contributor
Create a rule on the folder that executes a Javascript file that changes cm:name

mitpatoliya
Star Collaborator
Star Collaborator
Yes exactly as Bob mentioned is way to go.

1)Just to add in that script will read name from current file
2)remove extension though string operations
3)create property array for your new aspect where value is set with string created in step2
4)add that aspect to current file.