Change Folder Name

cancel
Showing results for 
Search instead for 
Did you mean: 
CRISTIAN_MULLER
Member II

Change Folder Name

 I have this scrit that runs wherever any folder are created in a workspace, the script runs automatically trough folder rules and works fine, except when the destination folder already exists, I give a look at source code of the page itself and notice that even that apears to have 2 folders with the same name (impossible with alfresco rules), turns out that the source code for the folder tiltle has a '&nbsp' caracter in spaces, so when my script compares the two folders name "ATESTADOS MÉDICOS" with "ATESTADOS&nbspMÉDICOS", visually they are the same because html puts a space at '&nbsp' location, when my script compares they are not the same.

Now I Have two change all the  '&nbsp' im my folders name.

Someone has an idea how to acomplish that?.

1 Reply
abhinavmishra14
Advanced

Re: Change Folder Name

I am not sure what is the full functionalities and steps that script is performing and trying to achieve. However, you can just cleanup the two names before comparision.   (whitespace) is an html entity which you can cleanup using some regex and then compare the values. 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)