daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest May 17th, 2018 112 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. dir | foreach { tf rename $_ { $_.Name -replace '^5', '2.3.2' } }
  2.    
  3. dir | foreach { $newname = $_.Name -replace "^5", "2.3.2"; tf rename $_ $newname }
  4.    
  5. dir | foreach { $newname = $_.Name -replace "^5", "2.3.2"; tf rename $_ $newname }
  6.    
  7. dir -filter 5* | foreach { tf rename $_ ($_.Name -replace '^5', '2.3.2')}
  8.    
  9. 6# dir -filter 5* | foreach { echoargs rename $_ { $_.Name -replace '^5', '2.3.2' } }
  10. Arg 0 is <rename>
  11. Arg 1 is <5foo.txt>
  12. Arg 2 is <-encodedCommand>
  13. Arg 3 is <IAAkAF8ALgBOAGEAbQBlACAALQByAGUAcABsAGEAYwBlACAAJwBeADUAJwAsACAAJwAyAC4AMwAuADIAJwAgAA==>
  14. Arg 4 is <-inputFormat>
  15. Arg 5 is <xml>
  16. Arg 6 is <-outputFormat>
  17. Arg 7 is <text>
  18.    
  19. dir . | foreach { $newname = $_.Name -replace "^5", "2.3.2"; tf rename $_ $newname }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top