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 IV
Resolver IV

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 IV
Resolver IV

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 IV
Resolver IV

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

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 IV
Resolver IV

They must have set it up this way on purpose.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,154)