Can anyone help me?

Discussion in 'OT Technology' started by BlaqueMan, Jul 23, 2007.

  1. BlaqueMan

    BlaqueMan New Member

    Joined:
    Feb 12, 2007
    Messages:
    417
    Likes Received:
    0
    Anyone know how to do this? or at least explain it to me in lamens terms?:

    Create a simple username and password file.

    Pipe this file into a FOR command as follows:

    C:\> FOR /F "token=1, 2*" %i in (credentials.txt)
    do net use \\target\IPC$ %i /u: %j


    thanks.
     
  2. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    Sir, I cannot help you. But I must say that is the ugliest syntax I have ever seen.
     
  3. BlaqueMan

    BlaqueMan New Member

    Joined:
    Feb 12, 2007
    Messages:
    417
    Likes Received:
    0
    i agree! thats what im seeking help to decipher it.
     
  4. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    What are you asking, how to create the password file?

    username1 password1
    username2 password2
    ...

    I'm missing the question?
     
  5. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    I think he wants the syntax decoded.
     
  6. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    The /f puts the for command into parsing mode (best way I can describe it), tokens defines how many vsriables will be created and which ones - in this case two variables starting with %i and ending with %j, the last variable puts the rest of the line into that variable because of the * (thus allows spaces), %i is the first variable, credentials.txt is the file to be processed and do is the what you want to do for each line you process. In this case, invoke a net use command and passing %i and %j to it.
     
  7. BlaqueMan

    BlaqueMan New Member

    Joined:
    Feb 12, 2007
    Messages:
    417
    Likes Received:
    0
    its still fuxing up
     
  8. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    By carefully examining the output you got and posted above, I've come to the conclusion that not only do you suck at life, but you also suck at asking questions, and therefore don't deserve help.

    In all seriousness - really - if you can't be bothered to ask a question properly, why should we bother?
     

Share This Page