1

I have a problem with passing parameters to variables in BAT file:

@setlocal enableextensions enabledelayedexpansion 

if "%5" NEQ "" ( 
echo [%5][%6] //it displays normal parameters like 10 and 30 
set /a sstart=%~5 // was testing without /a, without ~, with $, in all combinations 
set /a sstop=%~6 
echo [%sstart%][%sstop%] // parameters are empty 
set sekstart=--start-at duration:%sstart% 
set /a sekstopr=%sstop% - %sstart% 
set sekstop=--stop-at duration:%sekstopr% 
echo Start: %sstart% Stop: %sekstop% 
) 

This is for encoding in Handbrake: https://trac.handbrake.fr/wiki/CLIGuide

1 Answers1

0

Change

if "%5" NEQ "" ( 

to

if "%5" == "" goto skip
Henrik
  • 332
  • 3
  • 12