Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
consecutive loops in batch file
Name: vledda Date: March 3, 2005 at 02:52:28 Pacific OS: Win XP CPU/Ram: pentium 4
Comment:
I'm trying to execute a command that selects an element from one list and another one from the second list
e.g. MP2XML el1(from list1) el2(from list2) This is my code:
FOR %%A IN (*.akm) FOR %%B IN (*.xml) DO MP2XML FOR %%B IN (*.xml)
Name: Mechanix2Go Date: March 3, 2005 at 03:00:06 Pacific
Reply:
Hi vicky,
Do your akm & xml have "lines", ie strings terminated by CRLF pairs?
Do you need to select random elements with each run?
M2
0
Response Number 2
Name: vledda Date: March 3, 2005 at 03:08:21 Pacific
Reply:
no, i don''t think they have lines. I just need to select one elemt from each list and then execute the command with the 2 selected elements. Any ideas?
0
Response Number 3
Name: Mechanix2Go Date: March 3, 2005 at 03:11:33 Pacific
Reply:
Hi vicky,
So you have several akm & xml, like this?
1.akm 2.akm 3.akm 1.xml 2.xml 3.xml
?
M2
0
Response Number 4
Name: vledda Date: March 3, 2005 at 05:14:01 Pacific
Reply:
yes thats right
0
Response Number 5
Name: Mechanix2Go Date: March 3, 2005 at 07:34:21 Pacific
Reply:
Hi vicky,
This has some rough edges. I'm at a bit of a disadvantage, because I don't know what your program does. So I used COPY just to see if it tossed the right file names.
Maybe you can figure out the rest.
Notice that the first two lines are there to generate some files for testing.
::** for %%n in (ONE TWO THREE) do echo %%n > %%n.akm for %%n in (ONE TWO THREE) do echo X%%n > %%n.xml
for %%A in (*.*) do if %%~xA==.akm call :MP2XML %%A
Summary: i'm new to batch and i'm stuk at this moment, need to rename multiple txt files in a directory with specific characters from the first line in the file. The following works fine with the first file bu...
Summary: I am testing relative performance and configuration of Hard Drives in different PC and through different network environments. To do this I am wanting to create some known constants of my own, as well...
Summary: Hi These subroutines may be useful for calculating date issues in Batch File coding. The sub-rountines use variables a-f so best to not to use them in your calling code. Main varables returned are... ...