cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
G1981
Regular Visitor

Condition - Only Copy file if doesnt exist in destination folder

Hello

 

i need some help

 

i have a flow that is working fine.. it copys the files from folders to others

 

Clients (Original Folder)

     ClientA
             -File01
             -FIle02

     ClientB

              -File01

 

GClients (destination FOlder)

   ClientA
             -File01
             -FIle02

     ClientB

              -File01


But now i only need to copy the files if they doesnt exist in the destiny folder. How can i do that?

 

Thank you

8 REPLIES 8
PrasadAthalye
Super User
Super User

Is this related to Onedrive.. If yes, you can use find files in folder action and if you find it, skip copy.

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

No, this is related to Sharepoint.

@G1981 - Can you try logic like below? In the If else condition action, setup settings like below in 2nd image...

 

Please like and Mark this as solution if this resolves your issue.

 

PrasadAthalye_0-1600954448145.png

PrasadAthalye_1-1600954534117.png

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

 

Hi @G1981 ,

 

There is a parameter in the Copy file action to check whether the Destination Folder already has the same file.

60.PNG

 

Best Regards,

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

Thats a good solution, but i need to have to conditions

 

  • If the file exists, dont copy  

and if

  • if the file + sufix _DONE exist, dont copy

    For example, i want to copy the file "Test2020" but if i have in the destination folder one file "Test2020_DONE" i dont want to copy

 

 

Hi @G1981 ,

 

You can first use Filter Query to filter files with the specified suffix in the specified Folder.

72.PNG

If so, the Copy file action is not executed. Then determine whether there is already a file with the same name, if there is, then fail this action.

73.PNG

 

Best Regards,

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

Hi

 

i cant find this "Filename"

G1981_0-1601458149495.png

 

 

Hi @G1981 ,

 

The File name in the screenshot is just a sample I provided. You need to fill in the appropriate Dynamic content to filter the files according to your configuration.

 

Best Regards,

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

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (29,561)