batch parameters: everything after %1

前端 未结 7 1085
离开以前
离开以前 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 18:58

    The following will work for args with ", =, ' '. Based on Dmitry Sokolov answer. Fixed issue when second arg is the same as first arg.

    @echo off
    echo %*
    set _tail=%*
    call set _tail=%%_tail:*%1=%%
    echo %_tail%
    

提交回复
热议问题