cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cmhenry23
New Member

Copying Files with unique Client IDs from one SharePoint site to another

I am having difficulty building a new cloud flow. Would appreciate any assistance from the community. 

 

We would like to build a flow to do the following:

  1. Manually trigger a flow (will be automated in future)
  2. Get all files that exist in a:
    1. Specific SharePoint site.
    2. Within a specific library.
    3. Within a specific folder in that library, and finally.
    4. Limit files retrieved to those with a specific four character text ID, such as 'ABCD' (our client IDs)
  3. One those files are returned, copy these files to:
    1. Specific SharePoint site within our tenant (each client has their own unique SharePoint site).
    2. Within a specific libary
    3. Within a specific folder in that library.

I have built a flow that can do all the above, except for 2d (limit files to those with a specific four character ID). Not sure if I cam using the proper terminology when searching for solution. Again, any help is greatly appreciated. 

 

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @cmhenry23 ,

 

Here is a test for your reference:

Here is libraryA:

vchengfenmsft_1-1669600387482.png

Here is libraryB:

vchengfenmsft_2-1669600424557.png

Please Use Filter Query by File Name (Get files properties only)

Filter query substringof ('Te', FileLeafRef) means: files contain files with 'Te'

 

 

substringof('Te',FileLeafRef)

 

 

vchengfenmsft_0-1669600288757.png

 

Here is result:

vchengfenmsft_3-1669600440875.png

 

Here are some links for your reference:

Power Automate OData filter query with examples - SPGuides

Solved: Filter Query by File Name (Get files properties on... - Power Platform Community (microsoft....

 

Best Regards

Cheng Feng

 

View solution in original post

4 REPLIES 4
CraigStewart
Super User
Super User

You could use a filter array for this to get what you need; I have a flow like this set up for deleting items that contain specific text in the filename.

 

CraigStewart_1-1669564019195.png

 

 

Thanks Craig. Having issues with final step. What value would I use in the 'File to Copy'? Have tried many different items

Flow1.png

Hi @cmhenry23 ,

 

Here is a test for your reference:

Here is libraryA:

vchengfenmsft_1-1669600387482.png

Here is libraryB:

vchengfenmsft_2-1669600424557.png

Please Use Filter Query by File Name (Get files properties only)

Filter query substringof ('Te', FileLeafRef) means: files contain files with 'Te'

 

 

substringof('Te',FileLeafRef)

 

 

vchengfenmsft_0-1669600288757.png

 

Here is result:

vchengfenmsft_3-1669600440875.png

 

Here are some links for your reference:

Power Automate OData filter query with examples - SPGuides

Solved: Filter Query by File Name (Get files properties on... - Power Platform Community (microsoft....

 

Best Regards

Cheng Feng

 

Thank-you Cheng!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,928)