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

Copy SharePoint document from one library to another

 

I am having trouble moving a document from one library to another.  My Flow is set to move a document when the status changes from Current->Archived.  Upon that change, I want Flow to copy the document from Library A to Library B.  When I run my Flow, it says the file doesn't exist.  What am I doing wrong?

 

Flow.pngFlow 2.png

 

 

17 REPLIES 17
v-monli-msft
Community Support
Community Support

Hi @sreedwilson,

 

I just got the same error and have updated this to the pg. Should there is any further information delivered, I will notice you here.

 

Regards,

Mona

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

@sreedwilson "Name" trigger output does not contain the file extension, right?. I've also tried also using Folder Path trigger output, instead of manually typing it; but the issue persistFolderPathNameExtension.png

 

 

TS
Regular Visitor

I have experienced the same issue.

 

I had the flow running successfully for months. I used the file extension as suggested. Not neither works.

 

 

Hi @efialtes@sreedwilson@TS,

 

I'm afraid that you cannot use the "Properties Only" trigger to copy files in SharePoint so far. It won't work with the way you set the file path. 

You could post this idea in the Flow Ideas forum, so it might be considered for future releases.

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Regards,

Mona

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

I am using a different trigger.- sharepoint item created.

 

The error reported is not with the trigger it is with the copy.  This was working before but stopped last week

2017-08-07_12-16-44.png

 

 

 

 

I just wanted to share that I get the same error message using the "Extract folder" step. I had the flow running for months and since August 2nd, 2017 it fails consistently on the "Extract folder" step. Indicating the extracted file doesn't exist. I assume that an extract folder is just a copy from the .zip file to a folder on SharePoint, so there might be some shared logic behind that is now somehow flawed.

So there is no way to copy a document from one document library to another using Flow?  Any suggestions for a workaround? I just need to move older documennts from one place to another - would rather not us SharePoint Designer.

I dont know if something has changed but i have fiinally got something working.

 

Rather than copy file. it seems to work fine using create file.

 

See below. I have another flow that takes an attachment from an email and creates a list item. The list has a calculated collum to shorten the email subject and give our clients name. This is then used by this flow to file it in the clients document library. It then deletes the item so next time it doesn't recreate the same file. 

 

2017-08-17_10-52-06.png

 

 

 

Happy days! But please Microsoft don't mess with this one....

The problem with Create File is that you keep downloading/re-uploading files all the time. Wait until you hit a file >50MB and see it fail.

 

The problem with Copy File is a bug in the code, if you look at the "File does not exist" message you will see that the _Destination_ file does not exist! This is because the path to the file is encoded incorrectly. This bug had been reported since quite a while, but is not fixed.

 

The workaround is to check if the file exists and then either delete it and copy, or skip copy (based on what you prefer). You may even send an approval email to the user, asking whether they want to overwrite or skip :- it seems approvals in Flow are all the rage 🙂 The trick is checking if the file exists. There are two approaches:

* Get Files -> foreach -> compare name. That is OK only for small libraries, as you generate tons of load and wait time. Plus you get extra nested blocks in the Flow Editor, making it even slower.

* Get File Metadata using path (give it full file name, not jus path) and then use Condition in advanced mode, checking for "Empty": @empty(body('Get_Files')?[Id'])) This looks scarier, but actually is faster and generates less load. Works for me :))

 

 

Anonymous
Not applicable

Has anyone at MSFT fixed this issue? It seems to be quite basic especially when there is a "Move button" whose logic we should be able to automate in Flow.  Take file XXX that I changed in Location A and move it to Location B. 

Anonymous
Not applicable

I am trying to do this as well and have used everything WITH a MSFT Flow specialist from MSFT Support and even they cannot get it to work. Of all the hairbrain things to NOT work, of all the Hype about Flow... this could not be more simple. #Frustrating

Hey @v-monli-msft,

 

 

Any updates on this issue?

I still got the same error as the first post on this and we are several months later.

I would like some feedback on this because this is a really needed standard action.

 

Kind regards

 

 

Tom



If this reply has answered your question or solved your issue, please mark this question as answered.

Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

Hi  @v-monli-msft,

 

Is there any update or a workaround for this issue. We have a similar requirement to move files from one library to another libarry.


Thanks,

Sru

I, also, am not able to get this to work.  I'd like to move a document from one library to another library whenever the approval workflow status changes to approved.  Then, delete the original from the originating library. 

 

Thank you.  

Such a simple function is proving to be a nightmare. I have a workflow, and once finished marks the file as approved.

Then I have a workflow that triggers when it sees the document as approved and need it to copy to a new document library and delete from the current list.

 

Can anyone help ?

Microsoft has (finally) added a copy file from SharePoint to SharePoint template. I'm still surprised how hard it is to create a blank Flow that does this.

Anonymous
Not applicable

Is there an option in Flow to copy file based on status change of one of the atribut called status? I would like to have a copy of file when it's status change from Review to Approve.

Any idea how to do it?

Thank you in advance for your help!

Helpful resources

Announcements

Power Platform Connections - Episode 7 | March 30, 2023

Episode Seven of Power Platform Connections sees David Warner and Hugo Bernier talk to Dian Taylor, alongside the latest news, product reviews, and community blogs.     Use the hashtag #PowerPlatformConnects on social media for a chance to have your work featured on the show.  

Announcing | Super Users - 2023 Season 1

Super Users – 2023 Season 1    We are excited to kick off the Power Users Super User Program for 2023 - Season 1.  The Power Platform Super Users have done an amazing job in keeping the Power Platform communities helpful, accurate and responsive. We would like to send these amazing folks a big THANK YOU for their efforts.      Super User Season 1 | Contributions July 1, 2022 – December 31, 2022  Super User Season 2 | Contributions January 1, 2023 – June 30, 2023    Curious what a Super User is? Super Users are especially active community members who are eager to help others with their community questions. There are 2 Super User seasons in a year, and we monitor the community for new potential Super Users at the end of each season. Super Users are recognized in the community with both a rank name and icon next to their username, and a seasonal badge on their profile.  Power Apps  Power Automate  Power Virtual Agents  Power Pages  Pstork1*  Pstork1*  Pstork1*  OliverRodrigues  BCBuizer  Expiscornovus*  Expiscornovus*  ragavanrajan  AhmedSalih  grantjenkins  renatoromao    Mira_Ghaly*  Mira_Ghaly*      Sundeep_Malik*  Sundeep_Malik*      SudeepGhatakNZ*  SudeepGhatakNZ*      StretchFredrik*  StretchFredrik*      365-Assist*  365-Assist*      cha_cha  ekarim2020      timl  Hardesh15      iAm_ManCat  annajhaveri      SebS  Rhiassuring      LaurensM  abm      TheRobRush  Ankesh_49      WiZey  lbendlin      Nogueira1306  Kaif_Siddique      victorcp  RobElliott      dpoggemann  srduval      SBax  CFernandes      Roverandom  schwibach      Akser  CraigStewart      PowerRanger  MichaelAnnis      subsguts  David_MA      EricRegnier  edgonzales      zmansuri  GeorgiosG      ChrisPiasecki  ryule      AmDev  fchopo      phipps0218  tom_riha      theapurva  takolota     Akash17  momlo     BCLS776  Shuvam-rpa     rampprakash  ScottShearer     Rusk  ChristianAbata     cchannon  Koen5     a33ik  Heartholme     AaronKnox  okeks      Matren   David_MA     Alex_10        Jeff_Thorpe        poweractivate        Ramole        DianaBirkelbach        DavidZoon        AJ_Z        PriyankaGeethik        BrianS        StalinPonnusamy        HamidBee        CNT        Anonymous_Hippo        Anchov        KeithAtherton        alaabitar        Tolu_Victor        KRider        sperry1625        IPC_ahaas      zuurg    rubin_boer   cwebb365   Dorrinda   G1124   Gabibalaban   Manan-Malhotra   jcfDaniel   WarrenBelz   Waegemma   drrickryp   GuidoPreite    If an * is at the end of a user's name this means they are a Multi Super User, in more than one community. Please note this is not the final list, as we are pending a few acceptances.  Once they are received the list will be updated. 

Register now for the Business Applications Launch Event | Tuesday, April 4, 2023

Join us for an in-depth look into the latest updates across Microsoft Dynamics 365 and Microsoft Power Platform that are helping businesses overcome their biggest challenges today.   Find out about new features, capabilities, and best practices for connecting data to deliver exceptional customer experiences, collaborating, and creating using AI-powered capabilities, driving productivity with automation—and building towards future growth with today’s leading technology.   Microsoft leaders and experts will guide you through the full 2023 release wave 1 and how these advancements will help you: Expand visibility, reduce time, and enhance creativity in your departments and teams with unified, AI-powered capabilities.Empower your employees to focus on revenue-generating tasks while automating repetitive tasks.Connect people, data, and processes across your organization with modern collaboration tools.Innovate without limits using the latest in low-code development, including new GPT-powered capabilities.    Click Here to Register Today!    

Check out the new Power Platform Communities Front Door Experience!

We are excited to share the ‘Power Platform Communities Front Door’ experience with you!   Front Door brings together content from all the Power Platform communities into a single place for our community members, customers and low-code, no-code enthusiasts to learn, share and engage with peers, advocates, community program managers and our product team members. There are a host of features and new capabilities now available on Power Platform Communities Front Door to make content more discoverable for all power product community users which includes ForumsUser GroupsEventsCommunity highlightsCommunity by numbersLinks to all communities Users can see top discussions from across all the Power Platform communities and easily navigate to the latest or trending posts for further interaction. Additionally, they can filter to individual products as well.   Users can filter and browse the user group events from all power platform products with feature parity to existing community user group experience and added filtering capabilities.     Users can now explore user groups on the Power Platform Front Door landing page with capability to view all products in Power Platform.      Explore Power Platform Communities Front Door today. Visit Power Platform Community Front door to easily navigate to the different product communities, view a roll up of user groups, events and forums.

Microsoft Power Platform Conference | Registration Open | Oct. 3-5 2023

We are so excited to see you for the Microsoft Power Platform Conference in Las Vegas October 3-5 2023! But first, let's take a look back at some fun moments and the best community in tech from MPPC 2022 in Orlando, Florida.   Featuring guest speakers such as Charles Lamanna, Heather Cook, Julie Strauss, Nirav Shah, Ryan Cunningham, Sangya Singh, Stephen Siciliano, Hugo Bernier and many more.   Register today: https://www.powerplatformconf.com/   

Users online (3,539)