
Announcements
Hi!
I'm looking for some help to create a Power Automate.
Goal
Put simply, I'm trying to create an instant flow that :
1. Scans files/folders from SiteA ;
2. Looks for specific strings in file name (ie. contains "XYZ" and ".pdf") ;
3. If found, copy that file from SiteA to SiteB with same folder structure;
This flow would be to set-up the SiteB for use. Afterwards, I would use an Automated Flow that uses the same logic, but on an Added/modified file trigger.
What I made so far
I'm working in a french environment in Sharepoint so I'll textually describe my flow instead of posting screenshots :
substring(variables('FullPath'),18, sub(length(variables('FullPath')),18))
(This trims down the "Shared Documents" string since dynamic Full Path starts at the Site's root)
What I don't like about this flow is that it takes a lot of time to complete since it scans all files AND folders, plus it creates superflous folders that won't contain any files in SiteB.
It seems to me that it would more optimal if the folder creation portion of the flow would be on a "per file" basis. I've searched through forums and I can't seem to find a simple way to do this, unless I'm missing something?
I'm not a programmer, but I learn fast. I'm not afraid of using variables and expressions to make this work if needed. I would just need a programmer's perspective/experience to help me understand how to make this work.
Thanks for you help!