Skip to content

Instantly share code, notes, and snippets.

@monban
Created October 6, 2015 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monban/8de494c25a7a5118fbb9 to your computer and use it in GitHub Desktop.
Save monban/8de494c25a7a5118fbb9 to your computer and use it in GitHub Desktop.
$items = Get-ChildItem -File
foreach ($item in $items) {
$dest = '..\..\' + $item.Name
Write-Output $dest
if (Test-Path $dest) {
Rename-Item $dest -NewName "$item.old"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment