Hi @Raki
I recommend you to use flow to complete this requirement.
You can refer to the screenshot below:
Since you need to get the folder name, we need to create several variables.
Next, we should get the value of variables:
The formula for each variable is as follows:
Path:
substring(body('Get_file_properties')?['{Path}'],0,sub(length(body('Get_file_properties')?['{Path}']),1))
Index:
lastIndexOf(variables('Path'),'/')
Folder name:
substring(variables('Path'),add(variables('Index'),1))
Finally we update the file attributes:
Test result:
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.