cancel
Showing results for 
Search instead for 
Did you mean: 

eXCELL TO METADATA

gatomadrid
Champ in-the-making
Champ in-the-making
I´ve got an excell with a list of files and i would like to create a set of aspects with this properties(new metadatas) . How can i do that?
2 REPLIES 2

invictus9
Champ in-the-making
Champ in-the-making
You will need to do some programming. JavaScript is supported by the Alfresco server, and you can have the server run JavaScript on a document. You would put the JavaScript into the Scripts folder in the Data Dictionary space of the site. Read the JavaScript entries in the Alfresco wiki for the details.

First, export the Excel file as a comma or tab separated file. Upload the file to a working space.

Define a custom aspect that contains the metadata properties you will need to apply to the files.

If the Excel file refers to a bunch of files by name, upload the files to the space. You can create a zip file of the files, and import them into that space.

Run your JavaScript script – from the CSV file, select Get Information. Select Perform Action, and then select Run a script and select the script. The script will run through the CSV file, pulling out the pieces it needs, finding the files by name, and adding the aspect to each file with the properties you want to add to them.



I suggest you develop the script on a development version of Alfresco on your desktop so that you can invoke the server-side JavaScript debugger. The interface between JavaScript and Java objects is not as clean as one would like it, and the debugger makes sense of many things for you.

gatomadrid
Champ in-the-making
Champ in-the-making
is there any example of javascript?
in my case i would like to associate the aspects to a space.