Re: simple Batch File questions
- From: WickedShark <donovanstewart88@xxxxxxxxx>
- Date: Tue, 15 Dec 2009 20:36:40 -0800 (PST)
On Dec 12, 6:54 pm, foxidrive <got...@xxxxxxxxxxxxxx> wrote:
On Sat, 12 Dec 2009 16:05:18 -0800 (PST), WickedShark <donovanstewar...@xxxxxxxxx> wrote:
I like the idea of processing the IP octects with an iplist.txt but I
also like this piece set sessparms=abcdefghijklmnopqrstuvwxyz.
This way it processes each IP octect and I get the a b c d e session
parameter. If this can be done than I think I have what I need for
now.
This borrows billious' technique:
@echo off
setlocal EnableDelayedExpansion
set sessparms=abcdefghijklmnopqrstuvwxyz
set session=
for /f %%a in (file.txt) do (
set session=!sessparms:~0,1!
set sessparms=!sessparms:~1!
start "" c:\riom.bat %%a !session!
)
Can either one recommend a good book for batch file scripting? As you
can see mine is very limited.
I don't know of a good book - I'd recommend modifying scripts that already exist, to fine
tune them and enhance them, and posting here or in alt.msdos.batch.nt (preferred) when
problems crop up. Learning from hands on experience is a good technique for batch so you
can integrate the "gotcha's" and undocumented tricks as they appear.
Ok so the script is working great. Now I see one issue though. Many
times I have to start and stop the Dynamo sessions. Is there a way to
put a check in to see if an IP from the list is already running? This
way it will not start that IP again. I can edit the list each time I
want to stop and start a failed or stopped test but it would be easier
to just run the script again and have it check to see what IP's are
running and then not start them or just start the ones that are not
running.
.
- Follow-Ups:
- Re: simple Batch File questions
- From: foxidrive
- Re: simple Batch File questions
- References:
- Re: simple Batch File questions
- From: billious
- Re: simple Batch File questions
- From: WickedShark
- Re: simple Batch File questions
- From: billious
- Re: simple Batch File questions
- From: WickedShark
- Re: simple Batch File questions
- From: foxidrive
- Re: simple Batch File questions
- From: WickedShark
- Re: simple Batch File questions
- From: foxidrive
- Re: simple Batch File questions
- From: WickedShark
- Re: simple Batch File questions
- From: foxidrive
- Re: simple Batch File questions
- Prev by Date: Re: simple Batch File questions
- Next by Date: Re: simple Batch File questions
- Previous by thread: Re: simple Batch File questions
- Next by thread: Re: simple Batch File questions
- Index(es):
Relevant Pages
|