windows - Create a BAT file to run multiple file -
i need create bat file run multiple file.file in same folder have different name , have different parameter. there example of file:
.\mmdsv1.0.exe i_30_2_02_02_1.csv 7 .\mmdsv1.0.exe i_30_2_02_02_2.csv 7 .\mmdsv1.0.exe i_30_2_02_02_3.csv 7 .\mmdsv1.0.exe i_30_2_02_02_4.csv 7 .\mmdsv1.0.exe i_30_2_02_04_1.csv 7 .\mmdsv1.0.exe i_30_2_02_04_2.csv 7 .\mmdsv1.0.exe i_30_2_02_04_3.csv 7 .\mmdsv1.0.exe i_30_2_02_04_4.csv 7 .\mmdsv1.0.exe i_30_2_02_06_1.csv 7 .\mmdsv1.0.exe i_30_2_02_06_2.csv 7 .\mmdsv1.0.exe i_30_2_02_06_3.csv 7 .\mmdsv1.0.exe i_30_2_02_06_4.csv 7 .\mmdsv1.0.exe i_30_2_02_08_1.csv 7 .\mmdsv1.0.exe i_30_3_08_02_3.csv 10 .\mmdsv1.0.exe i_30_3_08_02_4.csv 10 .\mmdsv1.0.exe i_30_3_08_04_1.csv 10 .\mmdsv1.0.exe i_30_3_08_04_2.csv 10 .\mmdsv1.0.exe i_30_3_08_04_3.csv 10 .\mmdsv1.0.exe i_30_3_08_04_4.csv 10 .\mmdsv1.0.exe i_30_3_08_06_1.csv 10 .\mmdsv1.0.exe i_30_3_08_06_2.csv 10 .\mmdsv1.0.exe i_30_3_08_06_3.csv 10 .\mmdsv1.0.exe i_30_3_08_06_4.csv 10 .\mmdsv1.0.exe i_30_3_08_08_1.csv 10 .\mmdsv1.0.exe i_30_3_08_08_2.csv 10 .\mmdsv1.0.exe i_50_2_06_08_1.csv 12 .\mmdsv1.0.exe i_50_2_06_08_2.csv 12 .\mmdsv1.0.exe i_50_2_06_08_3.csv 12 .\mmdsv1.0.exe i_50_2_06_08_4.csv 12 .\mmdsv1.0.exe i_50_2_06_10_1.csv 12 .\mmdsv1.0.exe i_50_2_06_10_2.csv 12
someone can me? all
you have shown list of example file names, did not explained how file names must processed, got old crystal ball, cleaned , asked it: "what problem about?" , answer:
"giving list of file names comprised of several parts separated underscore , list of numbers, select different number parameter each time new file name differs previous 1 in first 3 parts".
so solution:
edit: after op had gave right method, correct solution:
@echo off setlocal enabledelayedexpansion /f "tokens=1-3* delims=_" %%a in ('dir /b /a-d *.csv') ( set /a number=%%b*%%c*12/100 mmdsv1.0.exe %%a_%%b_%%c_%%d !number! )
Comments
Post a Comment