batch parameters: everything after %1

前端 未结 7 1087
离开以前
离开以前 2021-02-03 18:44

Duplicate:

  • Is there a way to indicate the last n parameters in a batch file?
  • how to get batch file parameters from Nth position on?
相关标签:
7条回答
  • 2021-02-03 19:13

    Building on schnaader's answer, I think this does it if you want everything after %1 concatenated.

    @echo off
    
    SHIFT
    
    set after1=
    
    :loop
    if "%1" == "" goto end
    set after1=%after1% %1
    SHIFT
    goto loop
    
    
    :end
    
    echo %after1%
    
    0 讨论(0)
提交回复
热议问题