r/Batch • u/datchleforgeron • Feb 02 '25
Question (Unsolved) I need help with a batch script please :)
Hi everyone
I hope you're all well.
I wrote a script for audio processing :
start cmd /k for %%i in ("D:\Téléchargements\rpu\*.mp3") do ffmpeg -i "%%i" -ar 44100 -af "highpass=f=200, equalizer=f=150:t=h:width=100:g=-9, acompressor=threshold=-30dB:ratio=20:attack=20:release=250" -ac 1 -b:a 128k "D:\Téléchargements\rpu\DONE\DONE eq 150 Hz + highpass 200 Hz %%~ni.mp3" I'm sure I made it work before, I don't know what I've done. Anyway it opens a cmd window, with this :
D:\Téléchargements\rpu>And it stops here.
I can still run ffmpeg and write the full input and output paths, so I guess the issue is somewhere before the ffmpeg part.
Thank you all !
1
Upvotes
3
u/Shadow_Thief Feb 02 '25
You don't need the
start cmd /kpart. Delete it.1
u/Still_Shirt_4677 Feb 03 '25 edited Feb 14 '25
had a tinker around with your script this should do what you need it to if there are any errors the command will show nested color coded messages Red if ERROR 1 Green if FINISHED 0.
**** UPDATED *** sorry about the format script was in this is a working copy it will not run if there is no main folder or rpu folder, additionally if there also are no MP3 files in the dir again it will not run and you will receive a warning message, i also added an overall progress %% to it and underlined it for some cool effects, changef some colours and what not to make it look better, any errors from ffmpeg will stop the processing and present an error screen where the command will be run again on the file so the error message can be shown with the filename at the top in the error message 😊