Hi Dirk,
Happy new Year 2015 to you and all other fellows here
I finally got time to investigate my issue with the tool you suggested. I unfortunately couldn't clear infos with it but it was worth the try anyway.
Also, I did some further attempts this morning and noticed something I didn't so far. Eventually it would deal with some "cache" for InDesign. Let me explain :
If I :
1) open InDesign
2) run my script
3) target a folder
4) ask for a renaming process
Then it's ok all the time. I can do multiple rename.
However if I open/close any of the file within that folder, the folder is no longer rename-able as long as I don't close InDesign. On next startup, If I do the previous steps, it's working fine. I double checked that InDesign had no open documents or books. The fact that restarting InDesign seems to solve the issue makes me think to some "cache" that even once the document was closed, some connection remains on a sub-level. I agree it's highly theoritical but it' the only way I can explain what I see.
I thought I would try to empty the temp folder in case it would magically solve my issue but of course not. Some log files aren't removable anyway.
Also, if some files or subfolders i highlighted on the explorer, the rename fails. But I am not really surprised and it's something that clearly is beyond the scope of scripting here.
Well nothing new. I just wanted to share my last observations.
Best regards,
Loic