Bulk file operations in SharePoint can often leave users feeling bogged down. This article, the second in a series dedicated to streamlining these processes, delves into the specifics of deleting, copying, and moving multiple files at once.
SharePoint thrives on collaboration, often leading to vast libraries of files and folders. Managing this content efficiently requires the ability to perform actions like deleting, moving, or copying, multiple items at once—commonly known as “bulk operations.” Although SharePoint’s native tools provide some solutions, they frequently fall short when handling hundreds or thousands of files. While workarounds involving complex scripting, PowerShell commands, or third-party tools exist, they often present a barrier for everyday users due to their technical nature.
This article, Part 2 in our series on SharePoint bulk file operations, focuses on:
For a comprehensive understanding of bulk file and folder operations in SharePoint, be sure to explore the other articles in this series:
Table of Contents
While SharePoint offers some standard options for deleting files, there are more efficient methods available, including third-party solutions and PowerShell scripts. In this section, we’ll go over these options and best practices for bulk file deletion in SharePoint. For a more comprehensive guide, please check out another article on the topic: How to Delete Multiple Files from SharePoint.
Yes, in SharePoint, you can delete multiple files at once by selecting them and then choosing the delete option from the toolbar. Here’s a basic overview of the standard method:
Pic. 1. Using the “Delete” button.
While this method works for a small number of files, it becomes cumbersome when dealing with large volumes of documents.
To efficiently handle bulk deletions, you can use third-party solutions, PowerShell scripts, and some best practices with workarounds:
While numerous decent apps exist, some of which we’ve already mentioned previously, we genuinely recommend you use the Virto Multiple File Operations App because it greatly simplifies bulk file operations in SharePoint On Prem, allowing you to delete multiple files quickly and efficiently. The app also offers filters and conditions for precise deletions, saving time and reducing manual effort. Still exploring other options? Check out Nintex or HarePoint Workflow Extensions. Alternatively, consider the Virto Multiple File Upload App for SharePoint Online & Microsoft 365 (with bulk file delete features coming).
For SharePoint administrators, PowerShell provides a powerful way to automate bulk deletions. Here’s a basic example of how to use PowerShell for deleting multiple files:
# Load SharePoint module Import-Module SharePointPnPPowerShellOnline # Connect to SharePoint site Connect-PnPOnline -Url "https://yoursite.sharepoint.com" -Credentials (Get-Credential) # Get all files in the document library $files = Get-PnPListItem -List "Documents" # Delete each file foreach ($file in $files)
Finally, here are some best practices and workarounds for bulk file deletion in SharePoint:
For on-premises SharePoint environments, the Virto Multiple File Operations app is an excellent choice for managing bulk deletions. Here’s how to use it:
Pic. 2. Installing the Virto Multiple File Operations app.
Now, before we move to the next section, let’s briefly review some more prevalent use cases and situations you may encounter with bulk deletions in SharePoint.
To bulk delete items from a SharePoint list:
Pic. 3. Deleting multiple items in a SharePoint list.
SharePoint’s versioning feature can accumulate multiple versions of documents. To delete these versions:
Pic. 4. Navigating to “Version history” to delete multiple versions of docs.
To delete multiple SharePoint sites, you can use PowerShell for efficiency:
# Connect to SharePoint Online Connect-SPOService -Url "https://yoursite-admin.sharepoint.com" -Credential (Get-Credential) # List of sites to delete $sites = @("https://yoursite.sharepoint.com/sites/site1", "https://yoursite.sharepoint.com/sites/site2") # Delete each site foreach ($site in $sites)
With the right techniques, staff can systematically clean up document libraries, multiple files, versions, and sites in SharePoint, ensuring a streamlined and organized document management system.
Efficient content management in SharePoint often demands copying or moving files between libraries, sites, or even different SharePoint environments. This is crucial for organization, archiving, and collaboration. Hence, in this section, we’ll tackle typical scenarios for multiple file copy and move tasks in SharePoint, including the standard options available and alternative methods.
Before we get to instructions, let’s quickly review the basics like typical tasks and scenarios where multiple file copy and move operations are most required. So, typical tasks would often include:
Typical scenarios include bulk moving project files to a new project site, copying policy documents to a compliance library, or archiving outdated content.
👉 How do I select multiple files in SharePoint? To select multiple files, first navigate to the library where your files are stored. Once you’re in the library, hover over a file and check the box that appears next to it. Repeat this process for each file you want to select. If you need to select all files in the current view, you can use the “Select All” checkbox at the top of the list.
SharePoint offers built-in features for copying and moving multiple files:
Pic. 5. Copying and moving your chosen files or folders.
👉 How do I move multiple items in SharePoint? As discussed, navigate to the list or library containing the items you want to move. Once there, in the modern SharePoint experience, you can select the items by clicking the checkbox next to each one you wish to move, which is typically a row selection for list items. After selecting the items, look for the “Move to” button in the command bar and click it. This action will open a pane on the right side of the screen where you can choose the destination library, folder, or list. Once you’ve selected the desired destination, simply click “Move here” to initiate and confirm the move operation.
These methods are straightforward but can be limited by the number of files and the complexity of the operation.
For more advanced or large-scale operations, alternative methods include third-party solutions and PowerShell scripts:
As mentioned previously, third-party solutions remain a viable choice for organizations looking to streamline their bulk operations in SharePoint environment. Among those already mentioned, consider Virto Multiple File Operations App, ShareGate, Metalogix, and AvePoint. Plus, check out Mover as another alternative for copying and moving files to SharePoint.
It’s essential to emphasize the importance of security. If security is a major concern, it’s advisable to use Microsoft-authorized applications or native apps. These apps have been thoroughly vetted and approved by Microsoft and adhere to all recommended security practices. VirtoSoftware apps are considered native Microsoft apps, meaning that any necessary data storage occurs on Microsoft servers, unlike many other apps that store data externally.
PowerShell scripts can automate the process of copying and moving files, making it ideal for large-scale operations or custom requirements. Here’s an example script for copying files:
# Load SharePoint module Import-Module SharePointPnPPowerShellOnline # Connect to SharePoint site Connect-PnPOnline -Url "https://yoursite.sharepoint.com" -Credentials (Get-Credential) # Source and destination libraries $sourceLibrary = "SourceLibrary" $destinationLibrary = "DestinationLibrary" # Get all files in the source library $files = Get-PnPListItem -List $sourceLibrary # Copy each file to the destination library foreach ($file in $files) < $fileUrl = $file.FieldValues["FileRef"] $fileName = $file.FieldValues["FileLeafRef"] Copy-PnPFile -SourceUrl $fileUrl -TargetUrl "$destinationLibrary/$fileName" -OverwriteIfAlreadyExists
Finally, here are some common sense best practices to follow while copying and moving data in SharePoint:
While SharePoint offers basic functionality, third-party solutions like the Virto Multiple File Operations app and PowerShell scripts provide enhanced control and automation. By following best practices and leveraging these tools, you can streamline your file management tasks and ensure data integrity.
Duplicating a SharePoint document library involves creating a new library and copying the contents of the original library to the new one. Here’s how:
Pic. 6. Navigating to “Site contents”.
Pic. 7. Clicking “Document library”.
Pic. 8. Selecting your files and clicking on “Copying to”.
Pic. 9. Choosing a destination for your files.
For more advanced or large-scale operations, consider using third-party tools or PowerShell scripts. For example, to duplicate a document library using PowerShell:
# Load SharePoint module Import-Module SharePointPnPPowerShellOnline # Connect to SharePoint site Connect-PnPOnline -Url "https://yoursite.sharepoint.com" -Credentials (Get-Credential) # Source and destination libraries $sourceLibrary = "SourceLibrary" $destinationLibrary = "DestinationLibrary" # Get all files in the source library $files = Get-PnPListItem -List $sourceLibrary # Copy each file to the destination library foreach ($file in $files) < $fileUrl = $file.FieldValues["FileRef"] $fileName = $file.FieldValues["FileLeafRef"] Copy-PnPFile -SourceUrl $fileUrl -TargetUrl "$destinationLibrary/$fileName" -OverwriteIfAlreadyExists
While SharePoint’s built-in tools are adequate for basic tasks, they often fall short for large-scale document management. Thankfully, there are solutions to streamline these bulk operations. VirtoSoftware offers two robust tools:
These tools offer significant improvements over standard SharePoint options, making bulk file management much easier. We invite you to discover more by scheduling a demo call.
This article is part of a detailed series on bulk file and folder operations in SharePoint. Don’t miss the other articles in this series:
For other relevant pieces, visit our blog:
Marina Conquest is a seasoned copywriter with a passion for business development, ecommerce, and startup ecosystems. With over a decade of experience crafting compelling narratives for tech companies, Marina brings her entrepreneurial spirit and creative flair to every project.