Hi @skimber ,
Good Job with this one!
You had a mistake in the order of the functions,
you loop through all the items in the project and if an item contains a certain text you save it as a variable. but for some reason only after the loop is finished you move this item variable to the “Stock” Folder.
so in your loop went through each and every item in the project and checked if it is a stock footage but each time you just override the last variable and didn’t actually move the item to the “Stock” folder, so in this case you are left outside the loop with the last project item that the loop has identified as stock footage so you move only 1 project item of each type of stock footage.
Solution - you need to add the item to the “Stock” folder inside the loop so it will work on all the project items instead of just the last one.
- I also removed all the different variables for each type of stock footage, if you move all the footage to the same folder you can just use the “isStock” variable to determine if you need to move a project item into this folder so all the different variables are unnecessary (but you can add them back if you need them).
Organize Project v2.json (38.9 KB)
Let me know if you have more questions.