
Hi,
I'm monitoring a folder called "Outbox" via trigger: When a file is created or modified (properties only).
I want to copy folders into this "Outbox" folder. The copied folders may have subfolders.
If a upload from PC, or create the folders directly in Outbox folder it iterates through all subfolders,
but if a copy from another SharePoint path it only goes one level down (root of copied folder).
Example:
I have a folder called: Customer1, with sub1 and sub2, and files in the two subs.
Customer1 is located somewhere on Sharepoint. I use the "copy to" and select Outbox.
The trigger: When a file is created or modified (properties only) runs.
The output is: Customer1, sub1, sub2
So I'm missing the output of the files in the sub folder.
Thanks
Dear F,
Yes, that is how the action works, it only picks up the files/folders in that designated folder location, not any sub-folders.
But you can resolve this by doing a filter array on the output of this action (which is likely a 'List files in folder' action or something similar). Use filter array with a condition 'IsFolder' to identify which items are a folder and then perform a 'List files in folder' or similar action on the identified folder ... then do the same and the same until you have retrieved all the details for the folder & subfolders.
You can save all the results in a array variable ... and then use this variable to execute copy actions per path.
It will look something like this:
You can automate this further by including a 'Do Until' condition ... anyway you should get the idea.
Happy flowing,
Koen