Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
用法:abc.bat /c 1,2,3
代码:
@echo off echo %1 set variable=%2 echo %variable%
输出:
/c 1
如何防止参数值在传递给变量时被剪切?
用双引号将它们括起来。调用你的脚本使用
abc.bat /c "1,2,3"