Advertisement
filimonic

WEB to OGG transformer

Jul 15th, 2014
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $DirectoryIn = 'd:\wems'
  2. $DirectoryOut = 'd:\Wems\Convs'
  3. $Path_ww2ogg = 'D:\wems\ww2ogg.exe'
  4. $Path_revorb = 'D:\wems\revorb.exe'
  5. $Path_codebooks = 'D:\wems\packed_codebooks.bin'
  6. $files = @( Get-ChildItem -Path $DirectoryIn -Filter '*.wem' -Recurse -File )
  7. $counter = 0;
  8. ForEach ($file in $files) {
  9.     $counter++
  10.     $local:fileFullName = $file.FullName
  11.     $local:fileShortName = $file.Name -replace '\.wem$',''
  12.     $local:fileNewPath = Join-Path -Path $DirectoryOut -ChildPath $( $local:fileShortName + '.ogg' )
  13.     Start-Process -FilePath $Path_ww2ogg -ArgumentList @( $local:fileFullName,'-o',$local:fileNewPath, '--pcb',$Path_codebooks  ) -Wait -WindowStyle Hidden | Out-Null
  14.     Start-Process -FilePath $Path_revorb -ArgumentList @($local:fileNewPath ) -Wait -WindowStyle Hidden | Out-Null
  15.  
  16.     Write-Host -ForegroundColor Yellow "$($counter ) of $($files.Count)"
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement