如何使用文本文件中的参数启动程序? Batch.bat
@textFile = "c:\Users\Arguments.txt";
start "" "C:\Users\coffee.cmd" --join test.js --compile @textFile
Arguments.txt
test5.coffe
test2.coffe
答案 0 :(得分:2)
@echo off
set arg_file=textFile
setlocal EnableDelayedExpansion
for /f "usebackq delims=" %%A in ("%arg_file%") do (
set "argline=!argline! %%A"
)
start "" "C:\Users\coffee.cmd" --join test.js --compile !argline!
endlocal