Jump to content

TonyC

Member
  • Posts

    4
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Ireland

About TonyC

Profile Information

  • OS
    2003 x64

TonyC's Achievements

0

Reputation

  1. Yzöwl, thanks a million for your help. I actualy had echo off set originally but i wanted to see how the script was processing so i knocked it off. Forgot to reset it. Script working great.
  2. Firstly thanks for the reply. I've tried using the exclamation marks too but that will just echo "Dir is !Dir! Port is !Port! " I'm not sure when to use exclamation marks and when to use percentage signs in general. any other ideas? Tony
  3. Hi Folks, This is my first post so please forgive me if its too wordy or unclear. I'm trying to create a nested FOR loop in batch (w2003 SE SP2). What I want to do is take all the values in 1 text file and run each of them against each of the values in another text file. The first text file has 1 entry on each line and the second text file has 2 entries which are delimited by a ":" (colon not weird smiley face). The code is below. The echo's I've placed in Italics are just for testing as I want to see if the value has been set as the variable. In both cases the variable isnt being echo'ed. I know that I could just use the %a %i %j rather than Variables but I'd prefer to use the variables as i think its clearer and may need to add further variables. SETLOCAL EnableDelayedExpansion for /f "tokens=* delims= " %%a in ('type WWN.txt') do ( Set WWN=%%a Echo WWN is %WWN% for /f "tokens=1-2 delims=:" %%i in ('type DirPort.txt') do ( Set Dir=%%i Set Port=%%j Echo Dir is %Dir% Port is %Port% echo - symmask -sid -wwn %%a -dir %%i -p %%j -noprompt >>WWNDirport.txt ) Echo WWN Processed is %WWN% >>WWNDIRPORT.txt) thanks for any feedback
  4. Hi Lads, I've been dipping in and out of forums for a while now but i decided to sign up for yours. I copy and paste a bit of batch scripting every once in a while so expect to see me here looking for help. Also if anyone has a problem that i've already cut and pasted the solution to i'll be happy to pass it on. Regards, Tony
×
×
  • Create New...