2
I can't list a specific files of a directory passed as argument to a batch file.
The problem I am facing is that the pipe "|" character is not recognized, I used it to circumvent the dir
command limitations that it can
dir /b *.avi *.mp4 *.mkv
within a directory, but as I am creating this batch file to execute after uTorrent, I need to pass the directory as argument.
Globally, what I am trying to do is to automatically convert files downloaded by uTorrent to AAC audio.
Here's the batch files content:
FOR /F "tokens=*" %%i IN ('dir %1 /b /A-D | findstr /I (avi mp4 mkv)') DO ffmpeg -i "%%~fi" -c:v copy -c:a aac -ac 2 "%%~di%%~pi%%~ni_aac%%~xi"
PAUSE
No, it does not work: it says
') was expected
– AlexandreG – 2019-01-01T21:55:39.987Answer updated. – DavidPostill – 2019-01-01T22:17:03.157