Hi @RobSt,
In this case you have two possibilities either process each asset as it is uploaded, have a watch event on documents where you have certain project id = takes all uploaded documents 1 by 1, or have a script that would run every hour or day or whatever frequency you would need.
For the first option you can configure that only documents are fetched if they are uploaded to certain project and then based on naming/folder location move it to the designated task/sub-task, to do this you can search for the details of uploaded document, turn on advanced settings and search the collections for folder details where the document is uploaded to.
Second option where you process this in certain intervals is to query the project documents, and check their folders attribute directly, please refer to the screenshot bellow, using this option you get same data as above.

As to why different approaches, in the first case you always have to take details for each document and on every upload, imagine bulk update of 1k assets, it would create a lot of operations, with the second approach you have the flexibility to get all of the data at once and then do the processing, but the solution depends on the requirements like processing time etc..
Hopefully this was helpful. If you have any further questions please reach out.
Best regards,
Ivan Bebek