I've had a script I've used for years...unfortunately, it isn't restartable. What I'd like to do is loop through and check to see if the files have been processed. If not, process them. The problem is that I don't know where to begin. I need to check the files in "%destination% with the name %%f_resized.mp4", if they exist, I need to skip and go to the next. I've tried if exist, but "%destination%\%%f_resized.mp4" doesn't seem to work for me (likely because I'm using the for/do to process the original file and output the new filename at the destination. Here's the original script. Thanks.
@echo off &setlocal
set /p destination=Destination location:
set "ffmpeg="C:\Program Files\ffmpeg\bin\ffmpeg.exe""
for %%f in (*.mkv) do %ffmpeg% -i "%%f" -vf "scale=1280:trunc(ow/a/2)*2" -c:v libx264 -f mp4 -y "%destination%\%%f_resized.mp4"
for %%f in (*.mp4) do %ffmpeg% -i "%%f" -vf "scale=1280:trunc(ow/a/2)*2" -c:v libx264 -f mp4 -y "%destination%\%%f_resized.mp4"
for %%f in (*.avi) do %ffmpeg% -i "%%f" -vf "scale=1280:trunc(ow/a/2)*2" -c:v libx264 -f mp4 -y "%destination%\%%f_resized.mp4"
for %%f in (*.wmv) do %ffmpeg% -i "%%f" -vf "scale=1280:trunc(ow/a/2)*2" -c:v libx264 -f mp4 -y "%destination%\%%f_resized.mp4"
for %%f in (*.mov) do %ffmpeg% -i "%%f" -vf "scale=1280:trunc(ow/a/2)*2" -c:v libx264 -f mp4 -y "%destination%\%%f_resized.mp4"