To explain my flow below, I manually want to trigger it, I want to get all the files' inside the sharepoint link. I filter for only .xlsx files and where a custom metadata field 'Category' is empty.

Now, assuming there are two files with no category in the Path - Rev_WRR_India 2020 Month12.xlsx and Rev_WRR_India 2020 Month11.xlsx
Path: Shared Documents/Test/India/Revenue/WRR/
I want the Category field to be Rev|India|WRR|2020|Month11. Could someone please help me as I'm stuck with creating this format value for the category field and updating the file properties?
I'm not able to get the folder path inside the apply to each. If there is an easier way, please feel free to mention the same