cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Alex_Reig
Helper III
Helper III

Copy files with a specific word in the name to one file to another in Dropbox

Hi all,

 

I’m trying to create a flow to copy and paste files created in a dropbox folder to another dropbox folder.

 

The problem is that I don’t want to move all the files, but only the ones that have a specific word in the name,

 

For example, I want to copy and paste only the files that have adobe in their name;

 

Alex_Reig_0-1635415861223.png

 

 

I have created this flow but I don’t find where I can specify which files I want co copy

 

Alex_Reig_1-1635415861227.png

 

 

Thank you in advice;

 

Àlex

1 ACCEPTED SOLUTION

Accepted Solutions

Hello again Alex!

 

From what I can see and tested, the issue comes from different connector used in the trigger connector. Given the need to know the name of the file upload in Dropbox, it's recommended to use the connector "When a file is created (properties only)" instead of  "When a file is created". This connector will return the file name in a String format that is supported in the Condition Trigger.

I tried exactly your flow with the file name gave by you and replacing the trigger from  "When a file is created" to "When a file is created (properties only)". In this case the condition to check if the substring exists in the filename is fulfilled. After, you will need to add “Get file content” and use the Id property returned by the trigger action.

Basically, when you want to analyse the file name, or other properties beside the file content, using the "When a file is created (properties only)" is a better choice to return the data in the correct format. 

Any question that you have feel free to ask. 

 

------------------------------------------------------------------------- 
If I have answered your question, please mark your post as Solved. 
If you like my response, please give it a Thumbs Up. 

 

View solution in original post

6 REPLIES 6
t-imoreira
Microsoft
Microsoft

Hello Àlex! 
 
I believe I found a solution! 

Using the "Condition" action with the "contains" restriction you will be able to select only the files whose name contain the desired substring. The substring should be defined, for example, with the "Initialize Variable" action. Below I send a print screen of my flow, where I wanted to identify files uploaded to Dropbox containing the "teste" word.  

timoreira_0-1635432165715.png

 

Any question that you have feel free to ask. 

 

------------------------------------------------------------------------- 
If I have answered your question, please mark your post as Solved. 
If you like my response, please give it a Thumbs Up. 

 

Alex_Reig
Helper III
Helper III

Hi @t-imoreira 🙂

 

I have already used this flow with this file that contains MANDELBROT but it didn't work

 

Alex_Reig_1-1635433859174.png

 

The flow says that the result of the condition is false when it's true

 

 

Alex_Reig_0-1635433837195.png

 

Do you know what could have happened?

t-imoreira
Microsoft
Microsoft

Hello Àlex!


Can you please send a print screen of your flow? Sometimes some conditions can be missed!

Another point, can you please send me a copy of the name of your file? The one that it's not working from the previous printscreen? I am asking you this because I copy the name from the picture (2021-855- MANDELBROT), and it's working using the flow sent in my first reply. Just to to check if I am using the correct name.

You can also try to change the name of your file and check if the flow works (maybe the condition is not settle due to same spaces or other factors). Changing the name as well as the string to detect can help to detect the issue.

Waiting for your response.

Hello @t-imoreira 

 

The PDF file name is Factura 855 - MANDELBROT FRACTAL INVESTMENTS, S.L. 

 

And my flow is the following one:

 

Alex_Reig_0-1635505010224.png

 

Alex_Reig_1-1635505252409.png

 

 

Alex_Reig_2-1635505272401.png

 

Alex_Reig_3-1635505339959.png

 

 

 

 

Thank you very much 🙂

 

Àlex

 

 

Hello again Alex!

 

From what I can see and tested, the issue comes from different connector used in the trigger connector. Given the need to know the name of the file upload in Dropbox, it's recommended to use the connector "When a file is created (properties only)" instead of  "When a file is created". This connector will return the file name in a String format that is supported in the Condition Trigger.

I tried exactly your flow with the file name gave by you and replacing the trigger from  "When a file is created" to "When a file is created (properties only)". In this case the condition to check if the substring exists in the filename is fulfilled. After, you will need to add “Get file content” and use the Id property returned by the trigger action.

Basically, when you want to analyse the file name, or other properties beside the file content, using the "When a file is created (properties only)" is a better choice to return the data in the correct format. 

Any question that you have feel free to ask. 

 

------------------------------------------------------------------------- 
If I have answered your question, please mark your post as Solved. 
If you like my response, please give it a Thumbs Up. 

 

View solution in original post

Alex_Reig
Helper III
Helper III

Hello @t-imoreira 

 

It worked using  When a file is created (properties only),

 

Thank you 🙂

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (2,517)