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

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
Highlighted
Community Support
Community Support

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
Highlighted
Solution Sage
Solution Sage

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!
Highlighted
New Member

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

MyFlow.jpg

Highlighted
Community Support
Community Support

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

Highlighted
New Member

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

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

Highlighted
New Member

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

That worked great.  Thanks. Smiley Very Happy

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (3,918)