First off I want to preface this by working on off these instructions. Trying to modify them to meet my needs.
Where I'm running into issue is using the Folder path reductions.
Destination Path is currently
/Back up/TEST/ take(triggerOutputs()?['body/{Path}'],sub(length(triggerOutputs()?['body/{Path}']),1))
Which turns into /Back Up/TEST/Root Folder/Folder/Subfolder
Instead of /Back Up/TEST/Folder/Subfolder
I know can get the desired output mostly by using this:
join(skip(split(triggerOutputs()?['body/{Path}'],'/'),1),'/')
/Back Up/TEST/Folder/Subfolder/
however it ends up having the trailing / which will cause it to error out and give me a location not found error.
I've been looking up documentation to try and marry the two statements together to get it to product the output I want. However I don't think I understand syntax well enough as each attempt has resulted in invalid formulas.
Image of attempted flow