Skip to content

Instantly share code, notes, and snippets.

@Delivator
Created February 20, 2020 13:55
Show Gist options
  • Save Delivator/1b9b4cd1da0e2df6fb8ae08b35243158 to your computer and use it in GitHub Desktop.
Save Delivator/1b9b4cd1da0e2df6fb8ae08b35243158 to your computer and use it in GitHub Desktop.
param (
$infile
)
$date = "{0:yyyy}_{0:MM}-{0:dd}_{0:HH}-{0:mm}" -f (get-date)
Get-ChildItem $infile | Rename-Item -Path $infile -NewName { $_.basename + "_" + $date + $_.extension }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment