cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
strongw
Level: Powered On

Using wildcard in OneDrive for Business folder paths

Hello all! I am attempting to setup a flow where I can upload a file into one folder, trigger the flow via a button on my phone, and then have that file copied (created) into all folders in a different directory. This is all design to facilitate my classroom workflow - I create a template for something or a document to share and the flow copies it to all student folders for them to open and work on.

 

I attempted to do this by typing in the folder path /Classroom Submissions/Test Class/*/ with the thought that the flow might interpret the */ to mean that it should by copied (created in) all the subsequent directories. Is this function doable? OR should I find another means to do this with? Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Using wildcard in OneDrive for Business folder paths

Hi @strongw,

 

I don’t think your solution could achieve your needs, I have made a test on my side, please take a try with the following workaround:

  1. Choose a proper trigger, here I use Flow Button trigger.
  2. Add “Get file content” action
  3. Add “List files in folder” action, specify your folder path
  4. Add “Apply to each”, input parameter set to output of “List files in folder” action.
  5. Within “Apply to each”, add a Condition, left input box set to IsFolder content of “List files in folder” action, right input box set to true. In middle drop down, choose is equal to.
  6. Within “If/yes” branch, add “Create a file” action.

Image reference:4.JPG

 

5.JPG

 

 

The flow works successfully as below:6.JPG

 

 

Bets regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Using wildcard in OneDrive for Business folder paths

Hi @strongw,

 

I don’t think your solution could achieve your needs, I have made a test on my side, please take a try with the following workaround:

  1. Choose a proper trigger, here I use Flow Button trigger.
  2. Add “Get file content” action
  3. Add “List files in folder” action, specify your folder path
  4. Add “Apply to each”, input parameter set to output of “List files in folder” action.
  5. Within “Apply to each”, add a Condition, left input box set to IsFolder content of “List files in folder” action, right input box set to true. In middle drop down, choose is equal to.
  6. Within “If/yes” branch, add “Create a file” action.

Image reference:4.JPG

 

5.JPG

 

 

The flow works successfully as below:6.JPG

 

 

Bets regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

strongw
Level: Powered On

Re: Using wildcard in OneDrive for Business folder paths

Is there a way to build this to copy new files and folders on onedrive to multiple folders? This would be a way to distribute tasks to students instead of having to build a flow foe each new file...

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,982)