Re: simple Batch File questions

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.

.



Relevant Pages

  • Re: VBScript with Sessionid and RDP
    ... Remote Desktop Session), only RD Session instance is killed. ... If only console instance is running nothing happens as I want it to be. ... tried with double quotes but the script fails to execute. ... message - how about starting the batch file with "echo on"? ...
    (microsoft.public.scripting.vbscript)
  • sessions
    ... I have been writing a login script for a site, ... Warning: Unknown: Your script possibly relies on a session ... side-effect which existed until PHP 4.2.3. ... echo '"paul" has been stored in the session.'; ...
    (comp.lang.php)
  • Re: VBScript with Sessionid and RDP
    ... "RDP-TCP#12" session. ... execute the following commands at a Command Prompt in order to examine its ... tried with double quotes but the script fails to execute. ... message - how about starting the batch file with "echo on"? ...
    (microsoft.public.scripting.vbscript)
  • still probs with sessions..help
    ... I am trying to get this simple session scripts to work, ... I send a var 'name', via a form to a second ... On the third script I simply display the $_SESSION 'name', ... echo $_SESSION; ...
    (php.general)
  • Re: stupid IE7 question
    ... closer look on session handling. ... Obscure methods like hiding an URI always ... rewrites itself to another script of yours with the session key as the ... I am currently testing a proprietary secure web based ...
    (Pen-Test)