Software Development,  Tips

PowerShell in Action

Listing files on a particular folder:

  • Get-ChildItem -Path E:\music
  • Get-ChildItem -Path E:\music -name
  • Get-ChildItem -name

Rename part of name of multiple files:

  • dir | rename-item -NewName {$_.name -replace “old”,”new”}

Calculate the checksum values of files:

  • Get-FileHash -Path windirstat1_1_2_setup.exe -Algorithm SHA1
  • Get-FileHash -Path windirstat1_1_2_setup.exe -Algorithm MD5