Use if FOR loops

Home Forums Scripting DOS Command Shell Use if FOR loops

Viewing 1 post (of 1 total)
  • Author
  • Avatar

    I have avoided using For loops, as I have a very hard time understanding the mechanics.

    Two part question.
    1. I would like to run a wmic cmd agsinst a list of computers.

    for /f %a in (c:pc.txt) do (wmic bios get serial number)

    the output I get = the number of items in the c:pc.txt file, however the wmic output is from the local pc, not the computers in the txt.

    i have read many sites/ examples, but none help solve the issue.

    Please keep your answers as basic as possible- using one liners.
    Please offer assistance with DOS (do not wish to confuse myself further)

    2. Can you provide a good site that does NOT get so esoteric
    in the usage?

    thanks in advance

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.