kwizcom banner advertisement

How to Download All Files from a SharePoint Site?

Requirement: Download All Files from a SharePoint Site

How to Download All Files in SharePoint Site? 
To download all files from a SharePoint document library or folder, Simply use "Explore View".
  • Navigate to your SharePoint On-premises or SharePoint Online library.
  • Click on "View in File Explorer" from Views Drop down in SharePoint Online. For SharePoint On-premises, Click on "Open with Explorer" button in "Library" tab.
  • From the Explore view, you can download all documents or all attachments from any list or library to your local machine.
    sharepoint download all documents in a library
  • Now in the Explorer view, navigate one level up and you can download the complete site or site collection using explorer view by navigating up and down to the site, list or library objects.
    download all files from sharepoint
In modern libraries, You can simply select all files and hit "Download" button to download all files from a document library.

PowerShell to Download All Files from SharePoint site:
We can also use WebDav method to download all files from a SharePoint site or site collection. Just set the parameters in below script and hit run. This PowerShell script copies all files including files in all libraries, document versions, list item attachments of the given site and its subsites to the local disk path provided.
#Configuration Parameters
$DownloadPath= "c:\Downloads\Online"
#$WebDavUrl = "\\intranet.crescent.com\DavWWWRoot\sites\operations"
$webDavUrl = "\\abraaj.sharepoint.com@SSL\DavWWWRoot" #HTTPS

#Create Local Folder it it doesn't exists
If(!(Test-Path $DownloadPath))
{
      New-Item -ItemType Directory -Force -Path $DownloadPath | Out-Null
}

#Get All files from the Site and download to local folder
Get-ChildItem -Path $webDavUrl -Recurse | ForEach-Object {
    #Frame the destination path
    $DestinationPath = Join-Path -Path $DownloadPath -ChildPath (Split-Path $_.FullName -NoQualifier).Replace($webDavUrl,'');

    #Copy File to local path
    Copy-Item $_.FullName -Destination $DestinationPath -Force

    Write-host -f Green File Copied to $DestinationPath
}
This method works in both SharePoint On-premises and in SharePoint Online. Refer my another post to download all documents using PowerShell: PowerShell to Download All Files from SharePoint Library
How to Download All Files from a SharePoint Site? How to Download All Files from a SharePoint Site? Reviewed by Salaudeen Rajack on July 25, 2017 Rating: 5

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.