我尝试通过批处理文件使用 fsi.exe 运行 f# 脚本
CALL "path\fsi.exe" --quiet --exec --use:"path\FindAndDelete.fsx" arg1 arg2 arg3
我需要我的脚本程序与 arg1 arg2 和 arg3 一起运行。但是命令:
for arg in Environment.GetCommandLineArgs() do
printfn "%s" arg
打印所有参数并说 arg1 是错误的参数,但我只需要在脚本中使用 arg1、arg2、arg3 进行操作。尽管使用参数运行 f# 脚本并使用它们进行操作的最佳方法是什么?