『楼 主』:
[求助]『楼 主』: 如何在DOS下调用本地程序循环运行
使用 LLM 解释/回答一下
描述:本地C盘(可放在其他盘)有一个程序(MWC)需要调用本地文件处理大量数据,每次程序只能调用一个文件,共计2500多个(在input文件夹,与主程序同目录),运行完的结果放在output文件夹(与主程序同目录,文件夹名与input文件夹名一一对应)。
求助:如何在DOS下调用本地程序循环运行,只至结束。
下面是dos中的调用代码:
Microsoft Windows [版本 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Users\ly>cd \
C:\>cd mwc
C:\MWC>mwc -iinput/50136 -ooutput/50136 -smfx both all
其中-i,-o,-smfx both all均为MWC程序的参数,每次都固定的,不用管;input和output为文件夹,每次运行时都是去input取数据,output为运行完后存放数据,也是固定的;50136是变量,总共有2522个,每次运行时去input的50136中读文本数据,执行完后再将结果保存在output的50136文件夹中。也即input中的这个变量名和output中的变量名要一一对应。
自己初步共dos 下的FOR /F 执行了一下,未成功。
for /f %x in (50136 50137) do c:/MWC/MWC -iaa/%x -oaa_out/%x -smfx both all
不知道哪儿出错了。
谢谢吧友指点一下!
Description: There is a program (MWC) on the local C drive (can be placed on other drives) that needs to call local files to process a large amount of data. Each time the program can only call one file, there are a total of more than 2500 (in the input folder, in the same directory as the main program). The running results are placed in the output folder (in the same directory as the main program, and the folder name corresponds one-to-one with the input folder name).
Help: How to call the local program in DOS to run in a loop until it ends.
The following is the calling code in DOS:
Microsoft Windows
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Users\ly>cd \
C:\>cd mwc
C:\MWC>mwc -iinput/50136 -ooutput/50136 -smfx both all
Among them, -i, -o, -smfx both all are all parameters of the MWC program, which are fixed each time and do not need to be cared about; input and output are folders, each time it goes to input to get data, and after running, it stores data in output, which is also fixed; 50136 is a variable, there are a total of 2522, each time it goes to read the text data in input/50136, and after execution, it saves the result in the output/50136 folder. That is, the variable name in input and the variable name in output should correspond one-to-one.
I initially executed FOR /F in DOS and it didn't succeed.
for /f %x in (50136 50137) do c:/MWC/MWC -iaa/%x -oaa_out/%x -smfx both all
I don't know where the mistake is.
Thank you friends for your guidance!
|