Sharepoint 2013 Download Multiple Files

Sharepoint 2013 Download Multiple Files

This post is going to discuss how to perform a bulk file copy from a SharePoint library to a folder on the file system. Along with this blog post, I will also provide a downloadable script, which can be modified to work in your environment. As we are copying files from SharePoint to the file system, all metadata will be stripped. Additional work could be performed in order to export the metadata to an xml file. This functionality is currently not available in the version of the script provided.

I was recently working with a customer who needed to export files from one SharePoint environment and import them into another SharePoint environment. Though SharePoint does have this functionality built-in using Export-SPWeb and Import-SPWeb, in this case an export resulted in no files being exported from the desired directory. This was later determined to be corruption of the files after the export was unsuccessful on the desired directories.

Learn How to Download Large SharePoint Files From a SharePoint Server. Do you want to learn how to download files from SharePoint? Follow these simple steps and you will discover new ways of downloading and upload large files to your SharePoint site. SharePoint provides different softwares for downloading multiple files from a SharePoint sever. I am developing a Win8 (WinRT, C#, XAML) client application (CSOM) that needs to download/upload files from/to SharePoint 2013. How do I do the Download/Upload? C# windows-8 sharepoint-2013 csom. Downloading Folders and Multiple Files OK so maybe I am just being dumb here, but I don't seem to be able to see how to download a folder, nor can I seem to download multiple files, you select more than one file and the download option seems to just disappear.

In this case, the approach was simple enough. Read the folder and file structure from the specified list and replicate that structure on the file system.

This solution is tricky enough because of the way files are accessed in SharePoint lists. Enumerating all files in the list can be performed, however folder structure would not be maintained by calling $List.Items. In this case, what we have to do is perform two separate actions. One action to retrieve the root folder of the list and enumerate the items, and one action to enumerate each folder and each file in each folder. In order to do this, we call $List.rootfolder.files

We also need to enumerate all folder, and enumerate all of the files in each folder. This can be done by using $List.folders. This will list all folders (including subfolders) for the list.

$Folder.folder.files allows you to enumerate all files in a specific folder

Now that we have a collection of all of the files and their directories, we can export the files to the file system. This can be performed by accessing the binary steam of the SharePoint file, and assigning it to the binary stream of a file system object. This is performed by using the following snippet of code.

Once the script has been exported, the structure of the files and folders will be maintained on the file system as they were in the SharePoint site.

The script can be downloaded from the following location:
BulkFileExport.ps1 (compressed)

This script does require some edits. All edits are explained at the top of the script. Each child directory must be specified in the script. Each library which is to be exported will need to be added to the script using the three lines of PowerShell which are included. Here is a brief explanation.

Multiple

Download Files From Sharepoint Online

This next line will create a directory at the specified location. In this example, a directory will be made beneath the root directory and will be named StyleLibrary
New-Item -Path ($Directory + 'StyleLibrary') -ItemType Directory

This next line will retrieve a list with the specified title, and assign it to a variable. The variable name is not important, as long as the correct variable is passed to the ExportFiles Function in the next line
$StyleLibrary = $Site.RootWeb.Lists | ? {$_.title -eq 'Style Library'}

This next line will export files from the list specified via the first variable and to the subdirectory specified in the second variable.
ExportFiles $StyleLibrary 'StyleLibrary'

As always, feedback and suggestions are always welcome. If you do have any ideas on how to improve the script, I'd love to hear them.

You can also follow me on Twitter:

This is a custom action for SharePoint 2013 that enables multiple file download as a zip file (Bulk file download)

Sharepoint Download Multiple Files At Once

This is based on an existing SharePoint 2010 multi file download solution. Original solution can be found at SharePoint 2010 Download as Zip File Custom Ribbon Action. Credit goes to the original developer Bart X. Tubalinal for his solution.

This solution will work only on SharePoint 2013. (Will not work in SharePoint 2010)

#How to DeployDeploy the 'BulkDownload.wsp' included above and activate the Site Level (web) feature 'Bulk Download'. This will include a 'Download as Zip' button to the SharePoint ribbon control next to 'Download a Copy' button. This button is visible only in document libraries.

Sharepoint 2013 Download Multiple Documents

If you want to make modifications please use the Visual Studio 2012 solution and make modifications as necessary.