Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $hactool = "$PSScriptRoot\hactool.exe"
- $prodkeys = "$PSScriptRoot\prod.keys"
- $firmware = "$PSScriptRoot\Firmware 12.0.2\"
- $files = Get-ChildItem $firmware -Filter *.nca
- $numfiles = 0
- foreach ($file in $files) {
- $hacout = & $hactool -k $prodkeys -i $firmware$file | Out-String
- if($hacout -like '*Content Type: Meta*') {
- Get-Item $firmware$file | Rename-Item -Path $firmware$file -NewName { $_.Name -replace '.nca','.cnmt.nca' }
- $numfiles++
- }
- }
- Write-Host "Renamed "$numfiles " ncas"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement