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

Delete source file in Onedrive after sucessful copy to OneDrive for Business

How can I add a condition to remove a source file in personal OneDrive only if the copy to OneDrive for Business is sucessful?

3 REPLIES 3
v-micsh-msft
Community Support
Community Support

Hi @Coorzman,

 

It should work if we add the delete file Action after the copy file action.

If the copy file action failed, then the delete file action won't be executed.

For example,

1. First we add the OneDrive->When a file is created Trigger, choose the proper folder path,

2. Add the OneDrive for Business->Create file Action, select the File Name and File Content,

3. Add the OneDrive->Delete File Action, under the File Input, choose File Identifier content from the OneDrive->When a file is created trigger, see screenshots:

40.PNG

 

Hope the information above is helpful.

Regards,

Michael

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

When I try to do this for large files, the file gets copied but the file content has 0bytes instead of 240MB

This works for me, however, how would one even know to choose "File Identifier" in the first place????? Are there examples of the use of these examples somewhere that I missed or do we learn this through osmosis or using the force??

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.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (2,988)