Skip to content

Instantly share code, notes, and snippets.

@eugrus
Created June 11, 2026 15:49
Show Gist options
  • Select an option

  • Save eugrus/c4fe60028ed1a4ac7df9d95d94fb3c2e to your computer and use it in GitHub Desktop.

Select an option

Save eugrus/c4fe60028ed1a4ac7df9d95d94fb3c2e to your computer and use it in GitHub Desktop.
Get-ChildItem | Where-Object Name -match '^(?<d>\d{2})\.(?<m>\d{2})\.(?<y>\d{4}) (?<h>\d{2})\.(?<min>\d{2}) ' | Rename-Item -NewName {('{0}-{1}-{2}_{3}.{4} ' -f $matches.y,$matches.m,$matches.d,$matches.h,$matches.min) + $($_.Name.Substring($matches[0].Length))}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment