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:
Why %252f ?
My flow:
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?
Solved! Go to Solution.
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')
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
Hi @RezaDorrani ,
Thank you for your response.
Unfortunately, it throws the same error:
"...
Hi @lk777 ,
Please try to use the Is folder to exclude the folder.
Best Regards,
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.
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,
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')
User | Count |
---|---|
73 | |
50 | |
48 | |
27 | |
18 |
User | Count |
---|---|
27 | |
26 | |
25 | |
20 | |
19 |