There is such a line:
c: \ ffmpeg \ bin \ ffmpeg.exe -f dshow -i video="Lenovo EasyCamera" -vframes 1 -f image2 snapshot %% 04d.jpg


The picture is taken, but is it possible to make the new file be created with the new name when the script is run again?

2 Answers 2

Try using the -strftime option, then you can set a name pattern consisting of date and time values.
If this does not work for some reason, the same with the ripped file can be done immediately after its creation, using the jhead utility(it is intended for manipulating JPEG files, renaming them, changing EXIF).
Now

c: \ ffmpeg \ bin \ ffmpeg.exe -f dshow -i video="Lenovo EasyCamera" -vframes 1 -f image2 -strftime 1"d: \ %% Y-% % m - %% d _ %% H - %% M - %% S.jpg"