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

Moving (NOT copying) files from personal OneDrive to OneDrive for Business

I have both a personal OneDrive account as well as a OneDrive for Business (OfB) account.  When files are created in a certain folder in my personal OneDrive account, I want to move (NOT copy) them to my OfB account.  More specifically, if the file ends with a certain extension, I wanted to move it to one folder in my OfB account.  Files with any other extensions, I want to move to a separate folder in my OfB account.  I've been trying to do this with a Microsoft Flow, but I can't get it to work.  I've created the following customer flow, but am getting the following error.  Can this be done with a flow?  If so, how?

 

Flow Details:

 

|                                                                                            |

Yes                                                                                      No

|                                                                                            |

--Move or rename a file (Preview)                                       --Move or rename a file (Preview)

  --File: File name                                                                  --File: File name

  --Destination File Path: /Videos/File name                         --Destination File Path: /Pictures/Camera Roll/File name

  --Overwrite: No                                                                   --Overwrite: No

 

Error/Result:

--User the Condition section, it says:

 

   ActionFailed. An action failed. No dependent actions succeeded.

 

--Under the No (Move or rename a file) section.

 

BadRequest
--Inputs
  --File
      test.jpg
  --Destination File Path
      /Pictures/Camera Roll/test.jpg
  --Overwrite
      False
--Outputs
  --Status code
      400
  --Headers
--Body
{
  "status": 400,
  "message": "The provided drive id appears to be malformed, or does not represent a valid drive.",
  "source": "api.connectorp.svc.ms"
}

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Moving (NOT copying) files from personal OneDrive to OneDrive for Business

Hi @MIR1315,

 

Do you want to move a file from OneDrive folder to OneDrive for Business folder using “Move or rename a file” action of OneDrive for Business connector?

 

I suppose that you use “Move or rename a file” action of OneDrive for Business connector to move file from OneDrive folder to OneDrive for Business folder, is it true? The issue is confirmed on my side.

 

The “Move or rename a file” action of OneDrive for Business connector only support moving files between folders of OneDrive for Business, it could not move files from OneDrive folder to OneDrive for Business folder (Cross server to move files).

 

In addition, if you want to move files from OneDrive folder to OneDrive for Business folder, please take a try with the following workaround:

  • Add a “When a file is created” trigger of OneDrive connector.
  • Add a Condition, left input box set to File name dynamic content of the trigger, right input box set to .mp4, within middle drop down, choose ends with.
  • Within “If/yes” branch of Condition, add a “Create file” action of OneDrive for Business connector, specify Folder Path, File Name field set to File name dynamic content of the trigger, File content field set to File content dynamic content of the trigger. Under "Create file" action, add a "Delete file" action of OneDrive connector, File field set to File Identifier dynamic content of the trigger.
  • Within “If/no” branch of Condition, add a “Create file 2” action of OneDrive for Business connector, specify Folder Path, File Name field set to File name dynamic content of the trigger, File content field set to File content dynamic content of the trigger. Under "Create file 2" action, add a "Delete file 2" action of OneDrive connector, File field set to File Identifier dynamic content of the trigger.

Image reference:4.JPG

The flow works successfully as below:6.JPG

 

Best 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

5 REPLIES 5
Super User
Super User

Re: Moving (NOT copying) files from personal OneDrive to OneDrive for Business

Hi @MIR1315,

 

Can you please post a screenshot of your Flow configuration?

 

Thanks,

Fausto Capellan, Jr


Fausto Capellan, Jr


Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!

Proud to be a Flownaut!


MIR1315
Level: Powered On

Re: Moving (NOT copying) files from personal OneDrive to OneDrive for Business

MyFlow.jpg

Community Support Team
Community Support Team

Re: Moving (NOT copying) files from personal OneDrive to OneDrive for Business

Hi @MIR1315,

 

Do you want to move a file from OneDrive folder to OneDrive for Business folder using “Move or rename a file” action of OneDrive for Business connector?

 

I suppose that you use “Move or rename a file” action of OneDrive for Business connector to move file from OneDrive folder to OneDrive for Business folder, is it true? The issue is confirmed on my side.

 

The “Move or rename a file” action of OneDrive for Business connector only support moving files between folders of OneDrive for Business, it could not move files from OneDrive folder to OneDrive for Business folder (Cross server to move files).

 

In addition, if you want to move files from OneDrive folder to OneDrive for Business folder, please take a try with the following workaround:

  • Add a “When a file is created” trigger of OneDrive connector.
  • Add a Condition, left input box set to File name dynamic content of the trigger, right input box set to .mp4, within middle drop down, choose ends with.
  • Within “If/yes” branch of Condition, add a “Create file” action of OneDrive for Business connector, specify Folder Path, File Name field set to File name dynamic content of the trigger, File content field set to File content dynamic content of the trigger. Under "Create file" action, add a "Delete file" action of OneDrive connector, File field set to File Identifier dynamic content of the trigger.
  • Within “If/no” branch of Condition, add a “Create file 2” action of OneDrive for Business connector, specify Folder Path, File Name field set to File name dynamic content of the trigger, File content field set to File content dynamic content of the trigger. Under "Create file 2" action, add a "Delete file 2" action of OneDrive connector, File field set to File Identifier dynamic content of the trigger.

Image reference:4.JPG

The flow works successfully as below:6.JPG

 

Best 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

MIR1315
Level: Powered On

Re: Moving (NOT copying) files from personal OneDrive to OneDrive for Business

Thanks.  I'll give it a shot and let you know.

MIR1315
Level: Powered On

Re: Moving (NOT copying) files from personal OneDrive to OneDrive for Business

That worked great.  Thanks. Smiley Very Happy

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 (5,036)