![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-26 17:55 |
47,812 topics / 349,912 posts / today 2 new / 48,264 members |
| 其它操作系统综合讨论区 » [Help]『Original Poster』: How to run a local program in a loop under DOS |
| Printable Version 2,297 / 0 |
| Floor1 lingyang | Posted 2016-03-30 08:46 |
| 新手上路 Posts 2 Credits 5 | |
|
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 [Version 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 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! |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |