gpt4 book ai didi

windows - 批量从文本文件中获取开始参数

转载 作者:可可西里 更新时间:2023-11-01 10:26:17 25 4
gpt4 key购买 nike

如何使用文本文件中的参数启动程序?

批处理.bat

@textFile = "c:\Users\Arguments.txt";
start "" "C:\Users\coffee.cmd" --join test.js --compile @textFile

Arguments.txt

test5.coffe 
test2.coffe

最佳答案

@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

关于windows - 批量从文本文件中获取开始参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16712471/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com