0

I am trying to write a batch script that converts .wma videos into .mov using handbrake

This is what I have tried but it seems to not working.

FOR /F "tokens=*" %%G IN ('DIR /B /S *.wma') DO "C:\Program Files\Handbrake\HandBrakeCLI" -i "%%G" -o "%%G".mov --preset="Normal"

I have set the preset to normal since I would like to play the video on my pc.

Thanks

aphoria
  • 19,796
  • 7
  • 64
  • 73

1 Answers1

0

Your output name is formatted incorrectly.

Try -o "%%~dpnG.mov" ...

Full command:

FOR /F "tokens=*" %%G IN ('DIR /B /S *.wma') DO "C:\Program Files\Handbrake\HandBrakeCLI" -i "%%G" -o "%%~dpnG.mov" --preset="Normal"
Tony
  • 2,658
  • 2
  • 31
  • 46