Rename a folder based on children-files' contents

I live in Colombia. Our government has implemented a "digital invoicing" system for independent workers which basically has everyone trading zip files around. Inside the zip files is an xml file with the contents of the invoice, and a PDF file, which is in essence a "visualization" of said invoice. Most files are generated by a central (government owned) system that names files with the following scheme xml-nationalID#-invoice#.
I would like hazel to rename my invoices (the zip file) to YYYYMM - invoice# - invoicee.
What I think is the best way to do it is:
1. Open the zip file
2. Go into the folder
3. Read the xml file and save the invoicee as a token
4. rename the folder name using the token
5. archive the folder
I have not been able to do step 4. One running the rule inside the folder, there is no way to rename the parent folder. Or is there a fancy way of doing it?
I would like hazel to rename my invoices (the zip file) to YYYYMM - invoice# - invoicee.
What I think is the best way to do it is:
1. Open the zip file
2. Go into the folder
3. Read the xml file and save the invoicee as a token
4. rename the folder name using the token
5. archive the folder
I have not been able to do step 4. One running the rule inside the folder, there is no way to rename the parent folder. Or is there a fancy way of doing it?