Variables 无法将BAT参数传递给变量
我在将参数传递给BAT文件中的变量时遇到问题:Variables 无法将BAT参数传递给变量,variables,batch-file,command-line,parameters,Variables,Batch File,Command Line,Parameters,我在将参数传递给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 ss
@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%
)
这用于在手刹中进行编码:
改变
if "%5" NEQ "" (
到
改变
到
你有一个你有一个
if "%5" == "" goto skip