cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
snow77245
New Member

SharePoint - Copy Folder BadRequest error

Hi,

I am getting a !BadRequest error when trying to use SharePoint Copy Folder to copy series of template folders (inside same SharePoint site).  The source is "/Shared Documents/00 Current Event/Public Information Management" and the destination is "/Shared Documents/00 20211203 Flood - Whangaehu 01/Public Information Management".  I am doing a Create folder previously to create 00 20211203 Flood - Whangaehu 01 (which works) and then a  List Folder on /Shared Documents/00 Current Event to get the subfolders and then Apply to Each to try and Copy the folder structure.  Must be a syntax issue but I cannot figure out where.  The Flow and the error are listed below (same error for all 14 folders in 00 Current Events)

 

snow77245_1-1638562847618.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
iltoningui
Resolver II
Resolver II

Yes, I did a test and copying to a non exiting folder gave me an error.

 

You can set the path manually just to test this for yourself

View solution in original post

6 REPLIES 6
iltoningui
Resolver II
Resolver II

Hi @snow77245 

 

I made a test and to copy a file you need to make sure the destination folder exists.

 

Hope this helps

Consider marking this post as resolved

 

 

snow77245
New Member

The folder I am copying it to 00 20211203 Flood - Whangaehu 01 exists.  Are you suggesting that I need to create Public Information Management in order to copy to it.  That seems more like Copy Files than Copy Folders?

iltoningui
Resolver II
Resolver II

Yes, I did a test and copying to a non exiting folder gave me an error.

 

You can set the path manually just to test this for yourself

View solution in original post

snow77245
New Member

Thanks for your help.  I added a Create Folder call before the Copy Folder call and it worked (mostly).  Fell over when the looping found a file in a folder and didn't know what to do.  I must be missing something though as all I want to do is copy 1 set of folders (and its contents) into another folder and it shouldn't be this hard.  I will keep trying

snow77245
New Member

Got it working - as long as there were no documents in the top level of the folder that was being copied.  Still seems odd though - most other languages you can just say "Copy folder A to folder B and you get /B/A" - no need to create the A folders first

iltoningui
Resolver II
Resolver II

They must have set it up this way on purpose.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,747)