Skip to content

Instantly share code, notes, and snippets.

@kenny-evitt
Last active August 29, 2015 14:02
Show Gist options
  • Save kenny-evitt/9a5c944febfaf89b44ae to your computer and use it in GitHub Desktop.
Save kenny-evitt/9a5c944febfaf89b44ae to your computer and use it in GitHub Desktop.
PowerShell commands
# Prepend 'f ' to all of the files in the current directory with a '.jpg' extension.
Dir *.jpg | Rename-Item -NewName { "f " + $_.Name }
# Prepend 'f ' to all of the files in the current directory with a '.gif' or '.jpg' extension.
Get-ChildItem .\* -Include *.gif, *.jpg | Rename-Item -NewName { "f " + $_.Name }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment