Use if FOR loops Share on Facebook Post on reddit Tweet on Twitter Share on LinkedIn Home › Forums › Scripting › DOS Command Shell › Use if FOR loops This topic has 4 replies, 3 voices, and was last updated 3 years, 9 months ago by ljgodzilla. Viewing 1 post (of 1 total) Author Posts LICMember Dec 28, 2017 at 10:06 am #167358 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 Author Posts Viewing 1 post (of 1 total) You must be logged in to reply to this topic.