Having issues normalizing multiple files at once with Powershell
BigPhattyVW opened this issue · 4 comments
Describe what you are attempting to do
Hello! I am trying to normalize a folder of audio files. I have been trying to use the Powershell example in the wiki, but I'm getting an error. "for %%f in ("*.flac") do ffmpeg-normalize "%%f" -v -t -14 -c:a flac -ext" flac returns the error "Missing opening '(' after keyword 'for'". If I try the bash version it works fine.
Additional context
I apologize for the incorrect formatting, and the copious amounts of edits to the title. I'm Running Windows 10 Pro Version 22H2, FFMPEG 6.0-full_build-www.gyan.dev and Powershell 7.3.3
I believe this is Windows batch formatting (cmd.exe), not suitable for PowerShell! So you can either do it in cmd, or look up how to a loop in PowerShell. (E.g. Stack Overflow or Super User)
Ah ha, that makes sense!
So I just gave the same(ish) command a try in cmd.exe and it gave me an error "%%f was unexpected at this time". However I got lucky with searching this time. Dropping just one '%' sign got it to work just fine!
Thanks for your help!
Thanks for the feedback. I fixed the examples here: https://github.com/slhck/ffmpeg-normalize/wiki/examples#use-windows-loops-for-multiple-files
You're welcome!! And thanks for getting back to me so quickly!