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

Sharepoint copy files flow error messages

I am encountering some strange problem with the simple copy file (with folder strucrure) flow with different types of sources and destinations, like same site-same Document Library-different folders, same site-different Document Libraries or different sites-DL to DL.

They all produce similar error messages like this:

 

Error.jpg

Error-2.jpg

 

Why %252f ?

 

My flow:

 

Flow.jpg

It is interesting that this flow successfully copies all folders and files to the destination but for some reasons throws the above mentioned error message.

Am I missing something in my simple flow design or this is a bug?

 

1 ACCEPTED SOLUTION

Accepted Solutions
lk777
Level: Powered On

Re: Sharepoint copy files flow error messages

Hi @v-bacao-msft ,

 

All my multiple tests prove that the whole directory structure has been recreated even when there weren't any files in the root directory of the tree - only subdirectories with files in them, and even empty subdirectories were copied.

 

If you look at my error message, it shows that the error was caused by not finding a file (which is actually a directory) in the destination not in the source.

It works but probably it wasn't designed for that.

I believe that the 'copy file' can recreate a directory structure if it doesn't exist in the destination.

Whatever it is, I am done with this flow and  successfuly using 'Copy folder' which is a 2-step flow (schedule - 'Copy folder')

 

View solution in original post

6 REPLIES 6
Dual Super User
Dual Super User

Re: Sharepoint copy files flow error messages

Hi @lk777 

 

in the copy file action

 

replace Id dynamic content with Path - dynamic content

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

lk777
Level: Powered On

Re: Sharepoint copy files flow error messages

Hi @RezaDorrani ,

 

Thank you for your response.

 

Unfortunately, it throws the same error:

"...

{
"message": "The file /sites/Networking/WiFiEquipment/Cisco/RouterArchive/RV340 does not exist.\r\nclientRequestId: 4b5123c9-80f2-4ebc-90c4-8edfb4a04a0d\r\nserviceRequestId: d1ea049f-30e8-9000-4afe-488da1d25349",
"status": 404,
"errors": [
"-2130575338",
"Microsoft.SharePoint.SPException"
]
}
 
It looks like 'id' is a 'Path' with encoded '/'(encoded with %252f).
 
Just can't figure out why it checks the destination for the presence of the folder that was copied from the source?
 
Does it verify a copy process and when it encounters a folder in the destination, it throws an error because it expects it to be a file and not a folder?
 
'Copy file' recreates the whole directory structure but fails to accept folders in the destination?
 
No clue.
 
I will switch to 'Copy folder', because I do not see any difference between outputs of the listed here flow and simple 'Copy folder'.
At least it doesn't throw any errors.
 
 
 
 
Highlighted
Community Support Team
Community Support Team

Re: Sharepoint copy files flow error messages

 

Hi @lk777 ,

 

Please try to use the Is folder to exclude the folder.

186.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lk777
Level: Powered On

Re: Sharepoint copy files flow error messages

Hi @v-bacao-msft ,

 

Thank you for the proposed solution, but this is not what I need.

 

That isFolder condition copies only files in the root directory but filters out all subfolders with files in them.

I need to copy the whole directory structure with all files.

 

'Copy folder' does what I was trying to accomplish with the listed in my initial post flow and it works with no issues so far.

I am new to the Flow so have just missed 'Copy folder' initially.

 

Although, that flow was accepted by the Flow checker so I assume it was supposed to work and it does but with errors in the History.

 

Community Support Team
Community Support Team

Re: Sharepoint copy files flow error messages

 

Hi @lk777 ,

 

From my test, the error here is because the current item type is folder, so Copy file action cannot be executed successfully.

I am afraid that it is unable to copy the whole directory structure with all files by copy file action.

In addition, Flow checker can only detect some common errors, but the configuration of some parameters in Flow cannot be verified by it.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lk777
Level: Powered On

Re: Sharepoint copy files flow error messages

Hi @v-bacao-msft ,

 

All my multiple tests prove that the whole directory structure has been recreated even when there weren't any files in the root directory of the tree - only subdirectories with files in them, and even empty subdirectories were copied.

 

If you look at my error message, it shows that the error was caused by not finding a file (which is actually a directory) in the destination not in the source.

It works but probably it wasn't designed for that.

I believe that the 'copy file' can recreate a directory structure if it doesn't exist in the destination.

Whatever it is, I am done with this flow and  successfuly using 'Copy folder' which is a 2-step flow (schedule - 'Copy folder')

 

View solution in original post

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 (4,958)