SharedSamples.org
SharePoint Skill

Rename Files with Date Prefix

Renames all files in a SharePoint document library (including subfolders) to prefix them with their created date in yyMMdd format. Offers a preview before committing changes.

Rename Files with Date Prefix

About this sample

Renames all files in a SharePoint document library — including files in subfolders — to prefix them with their created date in yyMMdd format (e.g., 251203-Status Report.pdf).

Always shows a preview table before making any changes, listing current names, new names, folder paths, and skipped files. Files already prefixed with a 6-digit date are automatically skipped to avoid double-prefixing.

Products & metadata

SharePointMicrosoft 365 CopilotSharePoint-AI-SkillDocument Management