HaveAGitGat
HaveAGitGat

Reputation: 69

Special characters when using Windows batch files?

I'm having trouble running Windows batch files using Handbrake, whereby if a source file contains special characters then I get an error saying it can't find the source file because for some reason Windows converts special characters into unreadable text when running the batch file. For example:

HandbrakeCLI.exe -i % äöü日本語のキーボード é.avi -o % äöü日本語のキーボード é.mp4 --scan

If I copy the above and put it directly into CMD then it works. However, if I put it in a batch file then it fails. Any idea on how to make the batch files open successfully?

Upvotes: 1

Views: 677

Answers (1)

DitherDude
DitherDude

Reputation: 114

Try doubling the % signs, as you'll need to escape them in a saved file. See more escape characters at https://www.robvanderwoude.com/escapechars.php

Upvotes: 0

Related Questions