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

Simply want to move a file from one folder in sharepoint to another document library.

For example, when a scanner scans to a sharepoint library, users need to move it to another document site.  How can I accomplish to move automatically with Flow.

 

I tried the;

 

Sharepoint - Create File

If yes

Create File (in another location)

 

This does nothing...

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @DannyGT,

 

Thanks for explaining your requirement. Try the below flow.

 

f1.png

 

 

Let me know if you need any more help.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

View solution in original post

20 REPLIES 20
Super User III
Super User III

Hi @DannyGT,

 

What is your trigger event? You mentioned when a scanner scans a SharePoint library. Is this a document library list item column field? Can you please explain?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Regular Visitor

Lets say we have a scanner that successfully scan's documents into a folder on SharePoint Online at;

 

Site URL

Folder Id
/Shared Documents/Sales
 
We want all documents that are scanned into that folder (heck, lets just say any new document created or placed into that folder) to then be moved too;
 

Site URL

Folder Id
/Client Documentation/Scans
 
Basically, its just a move from one doc library to another, should be simple...but i cant get it to work.

Hi @DannyGT,

 

Thanks for explaining your requirement. Try the below flow.

 

f1.png

 

 

Let me know if you need any more help.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

View solution in original post

Regular Visitor

Going to try this now.  But looking at your example, will this only copy it and leave the original?  What if i wanted to 'move' or rather, copy it then delete the original (whatever is easier)

Also, maybe this is a dumb question, but when i update the flow and click done, does it take effect immediatly or does it take a few to propagate out?

It worked!  Thank you so much!  I also answered my own question and it took effect right away. 

 

Still curious about my delete question above though...

You should be able to delete the file using the Delete file action. It won't be atomic in the sense that it is possible that the copy action succeeded but the delete action failed - but should work most of the times unless you run into some permission issues.

Regular Visitor

What's the syntax to use for that delete command? How do I tell it to delete the source file from the beginning of this flow?

Hi @DannyGT,

 

Generally it could be done by adding a Delete action after the copy action:

37.PNG

 

Make sure you have the folder path and the file name generated rightly with the one which you would like to delete.

Hope this is helpful.

Regards

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.

Since its a scanner and the name should be unique to each scan, will doing it that way always delete the original source file that it just copied?  Just want to make sure it doesnt delete anthing else...

 

BTW - i added the delete as per your screen shot and it fails, additionally, i tried doing it this way...

 

test.jpg 

 

 

And this also failed...

Error log from my revision to the delete flow is as follows...

Outputs
  • Headers
    { "Pragma": "no-cache", "x-ms-request-id": "36c5b769-cc2a-4441-814e-4b6ce2f185c5", "Cache-Control": "no-cache", "Date": "Thu, 15 Dec 2016 18:13:41 GMT", "Set-Cookie": "ARRAffinity=088b929beac32154b04bc796b6da72237f2838d0102b333dc5f9719d2366e6d5;Path=/;Domain=127.0.0.1", "Server": "Microsoft-IIS/8.0,Microsoft-HTTPAPI/2.0", "X-AspNet-Version": "4.0.30319", "X-Powered-By": "ASP.NET", "Content-Length": "221", "Content-Type": "application/json; charset=utf-8", "Expires": "-1" }
  • Body

The error from when i set it up exactly as you suggested is as follows...

Outputs
  • Headers
    { "Pragma": "no-cache", "x-ms-request-id": "55bd089f-14d3-457b-8bd5-b467488cc264", "Cache-Control": "no-cache", "Date": "Thu, 15 Dec 2016 17:49:30 GMT", "Set-Cookie": "ARRAffinity=c81df84e4118b050f97aee33a1ec0664c5319b97beadbb25f99be77f6eaecef3;Path=/;Domain=127.0.0.1", "Server": "Microsoft-IIS/8.0,Microsoft-HTTPAPI/2.0", "X-AspNet-Version": "4.0.30319", "X-Powered-By": "ASP.NET", "Content-Length": "208", "Content-Type": "application/json; charset=utf-8", "Expires": "-1" }
  • Body
    { "Message": "No HTTP resource was found that matches the request URI 'http://127.0.0.1/datasets/https%253A%252F%252Fcompanyname.sharepoint.com%252F/files/Shared Documents/Sales/Test 12-15-2016.docx'."

Has anyone been able to figure out how to either delete or actually move a file from one location to another?

 

Scenario:

 

File is created / uploaded to folder Review

 

Email is sent to reviewer

 

Reviewer accepts or rejects

 

If accept = Y, then copy file in folder Review to folder Accepted then delete file in folder Review

 

If accept <> Y, then copy file in folder Review to folder Rejected then delete file in folder Review

Anonymous
Not applicable

Hi,

i just got the deletion working.

I tried to use path and file names - failing with the errors posted before.

Just use the "File identifier" like this (sorry, for the mix of german & english):

 

deletion working.png

The path to the document library or folder is not needed for the deletion when you use the "File identifier".

"File identifier" is not working with "File name" as far as i can tell now.

 

Regards,

Max

Max!

You saved me from pulling out my hair! I totally overlooked File identifier listed on the left. I also tried file name and path first.

Thank Max,

 

For the French is:

 

deletel.png

 

Hi guys, 

 

Did anyone get the "Copy file" action working cross site? (same site collection)

Works within one site, but not copying from a library in a top site, to a library in a sub site.

 

Thanks, 

Glenda

Hello Glenda,

 

 

you can use "get file content "  and then "Create File"  instead of "Copy File"

Helper V
Helper V

If you want to move SharePoint documents cross-site, you can use the Move SharePoint Document from Library action to move a file to nested structure of folder.

 

This action is in "Plumsail SP" connector, which is a part of Plumsail Actions product.

 

Note, it is a paid third-party solution. But it provides a rich set of actions that simplify working with SharePoint, permissions, and documents.

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (35,842)