You can achieve this with PowerShell by combining Get-ChildItem to enumerate PDFs, Get-ItemProperty to read the CreationTime, and Rename-Item to append the suffix only when it doesn’t already exist. A reliable approach is:
Get-ChildItem -Path "C:\Your\Directory" -Recurse -Filter *.pdf | ForEach-Object {
$creation = $_.CreationTime.ToString("yyyyMMdd-HHmm")
$baseName = [System.IO.Path]::GetFileNameWithoutExtension($_.Name)
if ($baseName -notmatch "\d{8}-\d{4}$") {
$newName = "$baseName" + "_" + $creation + ".pdf"
Rename-Item -Path $_.FullName -NewName $newName
}
}
This script traverses all subdirectories, formats the timestamp as YYYYMMDD-HHMM, and renames only if the suffix isn’t already present. Make sure you run it with sufficient permissions in the target directory, and test first on a small set of files to confirm the naming convention before applying it broadly.