【发布时间】:2012-07-25 18:05:29
【问题描述】:
我正在努力在 Alfresco 中编写脚本来重命名文件扩展名。
文件保存为filename.bin。我正在使用内容规则来说明文件名何时等于 *bin 重命名为 *pdf。
我在脚本方面有点挣扎,希望能提供任何帮助。
我的脚本如下:
// change the name of this document
document.properties.name = document.properties.name+".pdf";
// add a new property string
document.properties["cm:locale"] = mylocalenode;
// save the property modifications
document.save();
但似乎没有把我带到任何地方。
【问题讨论】:
-
请不要写“但似乎没有让我到任何地方”。那也不能让我们到任何地方:) ...如果有的话,你能显示一条错误消息吗?它似乎没有做任何事情?你检查过你的日志吗?
标签: javascript alfresco