web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : b/zX1cG1vtSeguuqwB0Hjw
Power Automate - Building Flows
Unanswered

Issue copying file in flow

Like (0) ShareShare
ReportReport
Posted on 28 Sep 2020 16:18:25 by 28

Hello all,

 

I'm trying to create a flow to update a Word template we have location in several different locations in our SharePoint Document Library. The flow is able to find all the copies of the template but when I try to copy/replace the template in the various folders it fails. I'm trying to use dynamic content for the folder path. I copied my flow and the error message on the 'Copy File' below.

 

Error on Copy File: "Failed to verify the existence of destination location at 'https://xxxxxxxxxxxx.sharepoint.com/sites/Projects/Shared  Documents/redacted full path/Field Docs/Safety/' due to error 'The system cannot find the file specified. (Exception from HRESULT: 0x80070002)'.\r\nclientRequestId: 0d11fb2d-d57b-4e04-93b2-5606ac1775b3\r\nserviceRequestId: 0d11fb2d-d57b-4e04-93b2-5606ac1775b3"

 

I get this error even though I have verified the file exists in that location.

Screenshot 2020-09-28 111200.png

  • PrasadAthalye Profile Picture
    on 09 Oct 2020 at 00:17:35
    Re: Issue copying file in flow

    Initialize variable at the top something like after trigger. Initialization of variable in the flow is always done at the root level.

     

    Inside the loop, you can use Set variable.

  • Community Power Platform Member Profile Picture
    on 08 Oct 2020 at 16:22:36
    Re: Issue copying file in flow

    For what I understand, you are creating a new file with the same name in the same folder of an already existing file, so basically you want to overwrite it.

     

    I tried something like that before, instead of using the "copy file", I used the "create file" and adding a "1" or something at the end of the name, once created, the flow will erase the "original" file then rename the "new" file removing the "1".

     

    I know that is more steps but it worked for me, while some other connectors gives some errors (or I don't understand the way they work).

  • lokdawg78 Profile Picture
    28 on 08 Oct 2020 at 16:00:46
    Re: Issue copying file in flow

    I've tried so many variations of this flow. Please help @v-litu-msft  

  • lokdawg78 Profile Picture
    28 on 02 Oct 2020 at 20:07:36
    Re: Issue copying file in flow

    @v-litu-msftSo I am fixating on the URL in the move/copy step of the flow. Maybe I am completely off, but I can't help but believe this has something to do with the URL being cut off by spaces.

     

    The full URL is https://*******.sharepoint.com/sites/projects/Shared Documents/********/Field Docs/Safety/ but gets cut off at the first space.The full URL is https://*******.sharepoint.com/sites/projects/Shared Documents/********/Field Docs/Safety/ but gets cut off at the first space.
    The full URL is "https://*****sharepoint.com/sites/projects/shared documents/projectname/field docs/safety/"
    The full URL leads to a destination that exists. There are files there. I feel like because it gets cut off the flow fails. I modified my flow to try and fix the issues with the spaces but I've not had any success.
     
    first partfirst part
    step 2step 2
    step 3step 3
     
    I don't understand at this point. Am I grabbing the wrong file properties? Is there a different URL property I should be using? Is this just a flaw with MS Flow? I'm losing my mind over this.
  • lokdawg78 Profile Picture
    28 on 01 Oct 2020 at 16:29:27
    Re: Issue copying file in flow

    @v-litu-msftHey Lin, still getting the same error.

     

    I tried updating the flow to first create a copy of the file then move it and still getting the same error.

     

     
     

     

     

     

    I don't know if this is relevant, but on the output I'm noticing in the body that the URL of the destination folder isn't a full URL, it looks like it cuts off the URL at the first space in the name.

     

     

     

  • v-litu-msft Profile Picture
    on 30 Sep 2020 at 10:08:09
    Re: Issue copying file in flow

    Hi @lokdawg78,

     

    Ok, we could create a temp file to create not existing folder, then delete it. After all, copy file:

    Screenshot 2020-09-30 180637.jpg

     

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

  • lokdawg78 Profile Picture
    28 on 29 Sep 2020 at 16:15:08
    Re: Issue copying file in flow

    @v-litu-msftThank you for replying Lin. When I try to create a file, I get another error.

     

    Error Details: A file with the name Shared Documents/redacted/Field Docs/Drawings/Doc Mod 40 - Architectural & Structural Revisions/redacted/Field Docs/Safety/Critical Dig Checklist.docx already exists. It was last modified by i:0#.f|membership|tom.stalley@cjerickson on 29 Jun 2020 11:19:58 -0700.
    clientRequestId: 207e550c-a038-4db2-9629-9412ab65bbaa
    serviceRequestId: 207e550c-a038-4db2-9629-9412ab65bbaa

     

     

    So when I try to copy a file, it can't find the directory or verify the directory is there. When I try to create a file it finds the directory but won't create the file because the pre-existing file is there.

  • lokdawg78 Profile Picture
    28 on 29 Sep 2020 at 15:54:33
    Re: Issue copying file in flow

    @PrasadAthalyeThanks for responding. I changed the flow to just get a single file's metadata since it won't let me run initialize variable inside an apply to each.

     

    lokdawg78_0-1601394760923.png

    lokdawg78_1-1601394798123.png

    Value: /Shared Documents/redacted/redacted/redacted/redacted/Forms/Critical Dig Checklist.docx

     

  • v-litu-msft Profile Picture
    on 29 Sep 2020 at 03:08:30
    Re: Issue copying file in flow

    Hi @lokdawg78,

     

    If the destination folder structure does not exist when you copy file, it will report the error: Failed to verify the existence of destination location. Destination folder should make sure it has been created, but acturally it is impossible.

    As a workaround, you could use the Create file action instead of Copy file action, it will create the folder if the folder doesn't exists in the destination path, steps as below, please have a try, hope it could help you:

    Screenshot 2020-09-29 105949.jpg

     

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

  • PrasadAthalye Profile Picture
    on 28 Sep 2020 at 22:41:01
    Re: Issue copying file in flow

    @lokdawg78  - Can you write folderpath into a variable and in the run, check what value it shows? That may help.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete