Copy link to clipboard
Copied
For a project, I regularly have to rename a lot of timelines based on a template from Excel. I used to do this manually, which takes a lot of time. Now I would like to automate this with the help of Automation Blocks. Unfortunately, I don't know what the appropriate script has to look like to realise this. Based on another script I have tried this so far as you can see on the screenshot. Unfortunately it does not work like this. What do I have to change to make it work?
2 Correct answers
Maybe your issue is that yu have the "Process only selected items" checkbox checked, but actually want to process all items instead of only selected ones?
I just recorded this video to test the workflow and it worked fine for me (in the video I kepft the "process only selected items" in the inputs panel, such that you can check/uncheck it there):
OK. I have figured out where the problem was. The CSV file must be saved in CSV UTF-8 format (separated by separators). This is the only way the file can be read correctly.
Copy link to clipboard
Copied
Looks almost good! Just plug the purple block inside the green one. Currently it is only executed once, after the spreadsheet has been read. If you plug it inside, it is executed many times, namely once for each row of the spreadsheet and this is what you want:
Copy link to clipboard
Copied
Thanks for the advice. It still does not work. But at least I no longer get an error message. Can I send you the script with a sample project and the Excel file? Or would the script itself be enough for you?
Copy link to clipboard
Copied
Maybe your issue is that yu have the "Process only selected items" checkbox checked, but actually want to process all items instead of only selected ones?
I just recorded this video to test the workflow and it worked fine for me (in the video I kepft the "process only selected items" in the inputs panel, such that you can check/uncheck it there):
Copy link to clipboard
Copied
OK. I have figured out where the problem was. The CSV file must be saved in CSV UTF-8 format (separated by separators). This is the only way the file can be read correctly.
Copy link to clipboard
Copied
Thanks a lot for the feedback - great to hear that it is working now. For issues with reading/writing csv also see the links at the bottom of this page: https://docs.mamoworld.com/automation-blocks/block-reference/filesSpreadsheet#troubleshooting-spread...
Copy link to clipboard
Copied
I have just discovered a bug while using the script. I use the search function in the project window frequently to display certain elements. When I use the script with an active filter, it starts doing wild things like renaming everything including folders. Or it names all selected files the same.
Copy link to clipboard
Copied
Can you descibe this in more detail? best share a screen recording of that you are doing.
The code explicitly does the search on all kinds of project items, not just sequences, so it is no surprise that it renames bins, too.
Also note that it does a search and replace in the names, so if you rename "Youtube_01" to "foo", it will also rename "YouTube_12" to "foo2", since it finds the "YouTube_1" also in "Youtube_12".
Copy link to clipboard
Copied
Since you probably don't want to search & replace, bun instead just to a basic replace of project item names, I wrote a new tool for you to do that.
Download it here:
https://www.dropbox.com/scl/fi/a715bv5dz1dq3ty10ehtc/Batch-Rename-Project-Items-with-Spreadsheet.xml...
Here is a tutorial showing it in action:

