Skip to content

Instantly share code, notes, and snippets.

@L0laapk3
Created January 3, 2019 18:22
Show Gist options
  • Save L0laapk3/3a995844ee3cbdaf23965b88d5a9665b to your computer and use it in GitHub Desktop.
Save L0laapk3/3a995844ee3cbdaf23965b88d5a9665b to your computer and use it in GitHub Desktop.
$shit = Get-ChildItem -Path "C:\ProgramData\Microsoft\Windows\Start Menu" -Filter '*(1).*' -Recurse -ErrorAction SilentlyContinue -Force | where {! $_.PSIsContainer}
foreach ($file in $shit)
{
echo $file
$dest = $file.FullName.Substring(0, $file.FullName.Length - 8) + $file.FullName.Substring($file.FullName.Length - 4, 4)
Move-Item -Path $file.FullName -Destination $dest -Force
}
$shit = Get-ChildItem -Path "C:\Users\L0laapk3\AppData\Roaming\Microsoft\Windows\Start Menu" -Filter '*(1).*' -Recurse -ErrorAction SilentlyContinue -Force | where {! $_.PSIsContainer}
foreach ($file in $shit)
{
echo $file
$dest = $file.FullName.Substring(0, $file.FullName.Length - 8) + $file.FullName.Substring($file.FullName.Length - 4, 4)
Move-Item -Path $file.FullName -Destination $dest -Force
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment