我在将参数传递给BAT文件中的变量时遇到问题:
@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%
)
这适用于手刹中的编码: https://trac.handbrake.fr/wiki/CLIGuide
答案 0 :(得分:0)
更改
if "%5" NEQ "" (
到
if "%5" == "" goto skip