r/PowerShell • u/Norest4themisfits • May 27 '26
Question missing while do loop error
hello! i know nothing about code and I'm just trying to convert some music files so itunes recognizes them, i keep getting an error on the following script
for (%f in (*.wav *.mp3 *.ogg)) {do {ffmpeg -i "%f" -b:a 128k -ar 44100 "%~nf_new.mp3"}}
the error is as follows
At line:1 char:88
+ ... .mp3 *.ogg)) {do {ffmpeg -i "%f" -b:a 128k -ar 44100 "%~nf_new.mp3"}}
+ ~
Missing while or until keyword in do loop.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingWhileOrUntilInDoWhile
knowing nothing about programming I have no idea how to fix it or what to add. please help!
View all comments
Show parent comment
1
u/Zozorak May 27 '26
Learned some c++ 3 years ago is a different statement than 'I know nothing about programming'.
I don't mind assisting people, but also don't want them to run something they don't know what it does and then break stuff.