BUG for script-method(?): item.filesInDir only when multiple directories
I have finally tried the script-method for renaming and it is a very powerful tool indeed :-)
However, I think, I encountered a BUG in the script-method for the item.filesInDir field:
when there are files from multiple directories in the rename-list, the value for item.filesInDir only seems to be set for the first directory, and for the other directories item.filesInDir has a value of 0 (zero)
(I did not check items.dirsInDir, but it may have a similar problem)
And as a suggestion for the docs:
it took me a while to discover that all fields of the item-object can be viewed with the autocomplete feature of the editor.
I think it would be good to mention in the user guide that there is an autocomplete feature for the script-editor -- and maybe even illustrate it in the example screenshot.
However, I think, I encountered a BUG in the script-method for the item.filesInDir field:
when there are files from multiple directories in the rename-list, the value for item.filesInDir only seems to be set for the first directory, and for the other directories item.filesInDir has a value of 0 (zero)
(I did not check items.dirsInDir, but it may have a similar problem)
And as a suggestion for the docs:
it took me a while to discover that all fields of the item-object can be viewed with the autocomplete feature of the editor.
I think it would be good to mention in the user guide that there is an autocomplete feature for the script-editor -- and maybe even illustrate it in the example screenshot.
Are you sure that you didn't use items.dirsInDir by mistake?
the code:
"return item.filesInDir + "-" + item.name;"
works perfectly for me even with nested directories
the code:
"return item.filesInDir + "-" + item.name;"
works perfectly for me even with nested directories
Reply to #2:
yes sorry, you are completely right:
I worked with the wrong assumption that the index-parameter would refer the "index within the directory", but of course it's the index within the complete renaming-list
yes sorry, you are completely right:
I worked with the wrong assumption that the index-parameter would refer the "index within the directory", but of course it's the index within the complete renaming-list