Skip to content

Instantly share code, notes, and snippets.

@Torxsmind
Created August 27, 2020 01:23
Show Gist options
  • Select an option

  • Save Torxsmind/40962fb6748410c2922e41c04a7d3e64 to your computer and use it in GitHub Desktop.

Select an option

Save Torxsmind/40962fb6748410c2922e41c04a7d3e64 to your computer and use it in GitHub Desktop.
Rename all files in a folder to random name
$files = Get-ChildItem -file -Path "C:temp\"
ForEach ($file in $files) {
Rename-Item -Path $file.FullName -NewName ([String]$(Get-Random) + $file.Extension)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment