Hello,
I use alfresco 5.2.0f.
Actually my colleagues use some name with "+" on the document.name
Exemple : XXXX + XXX.pdf
With a javasript i move the file in a folder and the folder get the name ot the filename.
I need to know how i can replace all the "+" by "_" for exemple.
Is someone know how to do ? Is there a javascript to save me from this "+" ?
In the end i want to extend this script for all the shared files.
Thank you by advance for you collaboration.
You can use the replace() function to do this.
Thank you for you answer,
Can you give me a sample of the javascript please ?
I'm a noob for it...
Here is the rename and move folder, i would like to have a replace for the name if there is a "+" in the props BDCSEDIT.
var Descr = document.properties["test:BDC-SEDIT-propriete"]; var libelle = document.properties["test:BDC-SEDIT-ObjetCommande"]; var tiers = document.properties["test:BDC-SEDIT-LibelleTiers"]; var parent = document.parent; var myfolder = parent.childByNamePath(Descr + "_" + tiers + "_" + libelle); if (myfolder === null) { myfolder = parent.createFolder(Descr + "_" + tiers + "_" + libelle); } document.move(myfolder);
Thank you for your help !
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.