Power Automate – Copy files from SharePoint to a local system folder

%3CLINGO-SUB%20id%3D%22lingo-sub-1347620%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Flow%20%E2%80%93%20Copy%20files%20from%20SharePoint%20to%20a%20local%20system%20folder%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1347620%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F573158%22%20target%3D%22_blank%22%3E%40MadhusudanShettyMS%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3ESounds%20like%20you%20are%20using%20PowerAutomate%20can%20you%20please%20attach%20the%20screenshot%20of%20the%20Flow%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1344317%22%20slang%3D%22en-US%22%3EPower%20Automate%20%E2%80%93%20Copy%20files%20from%20SharePoint%20to%20a%20local%20system%20folder%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1344317%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Team%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%26nbsp%3B%3CSPAN%3Ecopy%20files%20from%20a%20SharePoint%20Online%20document%20library%20to%20a%20file%20system%20on%20a%20local%20machine.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20am%20using%26nbsp%3BCreate%20File%20action%20to%20create%20files%20and%20move%20to%20local%20machine.%20It%20may%20fail%20sometimes%20because%20of%20large%20file%20size%20and%20length%26nbsp%3Bof%20file%20name%20exceeding%20the%20limit.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EHow%20can%20I%20capture%20those%20filenames%20which%20were%20failed%20in%20a%20string%20or%20array%20and%20reason%20for%20failure%3F%20Please%20help%20me%20on%20this%20issue.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F60%22%20target%3D%22_blank%22%3E%40Juan%20Carlos%20Gonz%C3%A1lez%20Mart%C3%ADn%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F111382%22%20target%3D%22_blank%22%3E%40Norman%20Young%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F174092%22%20target%3D%22_blank%22%3E%40Rob%20Elliott%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThank%20you.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1344317%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPower%20Automate%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1348934%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Flow%20%E2%80%93%20Copy%20files%20from%20SharePoint%20to%20a%20local%20system%20folder%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1348934%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F70455%22%20target%3D%22_blank%22%3E%40Alireza%20Rahimifarid%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%20I%20am%20using%20Power%20Automate.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20804px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F187769iFA2EFB4801407BA6%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Capture.PNG%22%20alt%3D%22Capture.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3BIt%20works%20and%20file%20is%20copied%20to%20system%20folder.%20After%20Create%20file%20%2C%20I%20want%20to%20capture%20Failed%20Filenames%20in%20a%20String.%20How%20can%20I%20do%20that%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2137762%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Flow%20%E2%80%93%20Copy%20files%20from%20SharePoint%20to%20a%20local%20system%20folder%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2137762%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F573158%22%20target%3D%22_blank%22%3E%40MadhusudanShettyMS%3C%2FA%3E%26nbsp%3BWhat%20if%20the%20sharepoint%20folder%20has%20many%20sub%20folders%2C%20Do%20we%20need%20List%20Folder%20step%20in%20between%20Sharepoint%20and%20Local%20folder%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2281865%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Flow%20%E2%80%93%20Copy%20files%20from%20SharePoint%20to%20a%20local%20system%20folder%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2281865%22%20slang%3D%22en-US%22%3EDid%20you%20get%20any%20solution%3F%20or%20any%20other%20work%20around%20to%20tackle%20large%20files%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2389523%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Flow%20%E2%80%93%20Copy%20files%20from%20SharePoint%20to%20a%20local%20system%20folder%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2389523%22%20slang%3D%22en-US%22%3EYes%2C%20simply%20create%20a%20%22Append%20to%20string%22%20command%20right%20after%20the%20create%20file%20command.%20Set%20it%20to%20append%20the%20%22Name%22%20variable%20and%20set%20it%20to%20only%20run%20if%20the%20last%20command%20failed.%20(The%20three%20dots%20in%20the%20upper%20right%20%3D%26gt%3B%20Configure%20run%20after)%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2467506%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Flow%20%E2%80%93%20Copy%20files%20from%20SharePoint%20to%20a%20local%20system%20folder%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2467506%22%20slang%3D%22en-US%22%3EHey%2C%20Does%20this%20require%20the%20Desktop%20Flow.%20Coz%20I%20am%20unable%20to%20find%20%22Get%20file%20content%22%20option%20on%20the%20cloud%20flow.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2467561%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Flow%20%E2%80%93%20Copy%20files%20from%20SharePoint%20to%20a%20local%20system%20folder%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2467561%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1084595%22%20target%3D%22_blank%22%3E%40Abby2992%3C%2FA%3E%26nbsp%3BPossibly.%20I%20may%20not%20understand%20you%20but%20the%20Get%20File%20Content%20block%20I%20am%20referring%20to(I%20think%20it%20has%20been%20like%20a%20month.)%20is%20part%20of%20the%20Sharepoint%20actions.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Hi Team

 

I want to copy files from a SharePoint Online document library to a file system on a local machine.

I am using Create File action to create files and move to local machine. It may fail sometimes because of large file size and length of file name exceeding the limit. 

 

How can I capture those filenames which were failed in a string or array and reason for failure? Please help me on this issue.

 

@Juan Carlos González Martín @Norman Young @RobElliott 

Thank you.

7 Replies

@MadhusudanShettyMS 

Hello,

Sounds like you are using PowerAutomate can you please attach the screenshot of the Flow?

 

@Alireza Rahimifarid 

 

Yes I am using Power Automate.

 

Capture.PNG

 It works and file is copied to system folder. After Create file , I want to capture Failed Filenames in a String. How can I do that ?

 

Thank you.

@MadhusudanShettyMS What if the sharepoint folder has many sub folders, Do we need List Folder step in between Sharepoint and Local folder ?

Did you get any solution? or any other work around to tackle large files?
Yes, simply create a "Append to string" command right after the create file command. Set it to append the "Name" variable and set it to only run if the last command failed. (The three dots in the upper right => Configure run after)
Hey, Does this require the Desktop Flow. Coz I am unable to find "Get file content" option on the cloud flow.

@Abby2992 Possibly. I may not understand you but the Get File Content block I am referring to(I think it has been like a month.) is part of the Sharepoint actions.