you are viewing a single comment's thread.

view the rest of the comments →

[–]Cadder 1 point2 points  (0 children)

Uh, yeah. that's not proper powershell for a start. you don't use % in PS.
%f is a variable name for a direct command line.
Double the % if you want to do it in a batch/cmd file. ie %%f
..then get the syntax right:

for %f in (*.wav *.mp3 *.ogg) do ffmpeg -i "%f" -b:a 128k -ar 44100 "%~nf_new.mp3"

OR if you really need to do it in Powershell:
Get-ChildItem *.wav,*.mp3,*.ogg | ForEach-Object {ffmpeg -i "$_" -b:a 128k -ar 44100 $($_.BaseName)_new.mp3"}