SharePoint File Renamer: Quick Ways to Batch Rename Documents
Overview
A SharePoint file renamer lets you quickly change filenames across libraries to enforce naming conventions, improve searchability, and simplify organization. Common approaches include using built-in SharePoint features, Power Automate flows, SharePoint Online Management Shell (PowerShell), third‑party tools, or desktop sync + bulk rename.
Quick methods (step-by-step)
- Power Automate — bulk rename via flow
- When to use: SharePoint Online, repeatable rules, metadata-based names.
- Steps:
- Create a new automated or scheduled flow.
- Use the “Get files (properties only)” action targeting the library and filter query if needed.
- Iterate with an “Apply to each” loop.
- Compose the new name (concatenate metadata like Title, Created, custom fields).
- Use “Send an HTTP request to SharePoint” or “Update file properties” + move/rename action to set the new file name.
- Run and monitor for errors.
- SharePoint Online UI + Quick Edit
- When to use: Small batches, manual control.
- Steps:
- Open the document library.
- Switch to “List” or “Quick Edit” view.
- Edit the Name or a title column directly row-by-row.
- Save — ensures versioning and metadata preserved.
- PowerShell (PnP.PowerShell) — scripted bulk rename
- When to use: Admins, large libraries, scheduled scripts.
- Steps:
- Install and connect:
Connect-PnPOnline -Url https://yourtenant.sharepoint.com/sites/yoursite -Interactive - Retrieve files:
Get-PnPListItem -List “Documents” -PageSize 2000 - Build new file name (use item fields, sanitized chars).
- Rename with
Move-PnPFile -ServerRelativeUrl \(oldUrl -TargetUrl \)newUrl -Force - Test on a subset first.
- Install and connect:
- Sync + local bulk rename tools
- When to use: Complex regex renames, Windows/macOS tools preferred.
- Steps:
- Sync library with OneDrive.
- Use a local bulk rename utility (PowerRename, Bulk Rename Utility, Automator).
- Let OneDrive sync changes back to SharePoint.
- Third‑party renamer tools and add-ins
- When to use: Enterprise needs, UI helpers, scheduled jobs, audit logs.
- Considerations: Check permissions, support for metadata, cost, and vendor security/compliance.
Best practices
- Backup: Run on copies or test library first.
- Preserve metadata: Prefer renaming file names without losing required metadata or breaking links.
- Sanitize names: Remove illegal characters and enforce length limits.
- Versioning & auditing: Check how renames affect version history and links.
- Handle duplicates: Implement suffixes or sequence numbers to avoid collisions.
- Permissions: Ensure your account has rights to rename/move files.
Common pitfalls
- Breaking links/references from other systems.
- Exceeding URL/path length limits.
- Sync conflicts when multiple users edit.
- Unintended metadata overwrites.
Quick example (Power Automate expression)
Compose a new name from Title and Created date:
Code
concat(triggerOutputs()?[‘body/Title’], ‘-’, formatDateTime(triggerOutputs()?[‘body/Created’],‘yyyyMMdd’), ‘.docx’)
If you want, I can provide a ready-to-import Power Automate flow, a PnP.PowerShell script tailored to your site, or a step-by-step guide for using PowerRename with OneDrive sync.
Leave a Reply