CMD command (if,goto) I need help

Ravyar Tahir

Estimable
Aug 18, 2014
14
0
4,560
if not exist 1.txt goto :1
if not exist 2.txt goto :2
if not exist 3.txt goto :3
if not exist 4.txt goto :4
if not exist 5.txt goto :5

:1

"ffmpeg.exe" -i "1.avs" -f yuv4mpegpipe -pix_fmt yuv420p -loglevel error - | "x265_ml.exe" --output-depth 8 --weightb --lookahead-slices 0 --preset slow --crf 27 --profile main10 --rd 4 --limit-refs 2 --rect --amp --rc-grain --limit-modes --aq-mode 3 --subme 3 --me 3 --bframes 8 --rc-lookahead 25 --ref 4 --no-strong-intra-smoothing --no-constrained-intra --high-tier --rdoq-level 2 --psy-rd 1.0 --frames 129608 --y4m --stats "eurotrip.2004.16d4u_new.stats" --output "1.hevc" -

dir/b/s *.hevc >1.txt

:2

"ffmpeg.exe" -i "2.avs" -f yuv4mpegpipe -pix_fmt yuv420p -loglevel error - | "x265_ml.exe" --output-depth 8 --weightb --lookahead-slices 0 --preset slow --crf 27 --profile main10 --rd 4 --limit-refs 2 --rect --amp --rc-grain --limit-modes --aq-mode 3 --subme 3 --me 3 --bframes 8 --rc-lookahead 25 --ref 4 --no-strong-intra-smoothing --no-constrained-intra --high-tier --rdoq-level 2 --psy-rd 1.0 --frames 129608 --y4m --stats "2.stats" --output "2.hevc" -

dir/b/s *.avi >2.txt

:3

"ffmpeg.exe" -i "3.avs" -f yuv4mpegpipe -pix_fmt yuv420p -loglevel error - | "x265_ml.exe" --output-depth 8 --weightb --lookahead-slices 0 --preset slow --crf 27 --profile main10 --rd 4 --limit-refs 2 --rect --amp --rc-grain --limit-modes --aq-mode 3 --subme 3 --me 3 --bframes 8 --rc-lookahead 25 --ref 4 --no-strong-intra-smoothing --no-constrained-intra --high-tier --rdoq-level 2 --psy-rd 1.0 --frames 129608 --y4m --stats "3.stats" --output "3.hevc" -

dir/b/s *.avi >3.txt

:4

"ffmpeg.exe" -i "4.avs" -f yuv4mpegpipe -pix_fmt yuv420p -loglevel error - | "x265_ml.exe" --output-depth 8 --weightb --lookahead-slices 0 --preset slow --crf 27 --profile main10 --rd 4 --limit-refs 2 --rect --amp --rc-grain --limit-modes --aq-mode 3 --subme 3 --me 3 --bframes 8 --rc-lookahead 25 --ref 4 --no-strong-intra-smoothing --no-constrained-intra --high-tier --rdoq-level 2 --psy-rd 1.0 --frames 129608 --y4m --stats "4.stats" --output "4.hevc" -

dir/b/s *.avi >4.txt

:5

"ffmpeg.exe" -i "5.avs" -f yuv4mpegpipe -pix_fmt yuv420p -loglevel error - | "x265_ml.exe" --output-depth 8 --weightb --lookahead-slices 0 --preset slow --crf 27 --profile main10 --rd 4 --limit-refs 2 --rect --amp --rc-grain --limit-modes --aq-mode 3 --subme 3 --me 3 --bframes 8 --rc-lookahead 25 --ref 4 --no-strong-intra-smoothing --no-constrained-intra --high-tier --rdoq-level 2 --psy-rd 1.0 --frames 129608 --y4m --stats "5.stats" --output "5.hevc" -

dir/b/s *.avi >5.txt
 

Ravyar Tahir

Estimable
Aug 18, 2014
14
0
4,560


yup I am looking for a batch script but I couldnt figure out how if and goto command work can you fix it for me ignore the action
 

Ravyar Tahir

Estimable
Aug 18, 2014
14
0
4,560


well I wanna make a batch after encoding is done create like 1done.txt but before encoding if 1.hevc and 1done.txt found skip to encode next file

I update the question detail so you understand what I am trying to do