Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $search=$args[0]
- $newname=$args[1]
- if ($null -eq $newname)
- {
- Echo ("Error, I need two inputs, something to search for and the new text")
- }
- Else
- {
- dir $search | rename-item -newname { $newname + $_.Name }
- }
Add Comment
Please, Sign In to add comment