I reencode a lot of video files with ffmpeg using the following command at the prompt:
for %F in ("..\*.*") DO ffmpeg -n -i "%F" -c:v libx265 -c:a copy "%~nF.mkv"
I created a batch file containing this command and put it in my profile path. But when I run it, I get the following:
M:\>ff.bat
The following usage of the path operator in batch-parameter
substitution is invalid: %~nF.mkv"
For valid formats type CALL /? or FOR /?
The syntax of the command is incorrect.
M:\>for F" -c:v libx265 -crf 28 -c:a copy "F" -c:v libx265 -crf 28 -c:a copy "%~nF.mkv"
A problem with quote marks maybe?