Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
help .bat file
Name: gorf Date: August 22, 2003 at 12:04:51 Pacific OS: winxp CPU/Ram: 2600 1gb
Comment:
i would like to make a loop in a .bat file if thers a way i got one but theres to meny numbers 1- 255 ex;
FOR %%1 IN (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17) do ping -n 1 192.168.1.%%1
this one works but i would have to type all 1-255 is there a why to make a counter 1-255? then loop it ?
Name: Chi Happens Date: August 22, 2003 at 13:35:49 Pacific
Reply:
gorf, please excuse my ignorance, and I don't mean to sound like an ass...but why are there so amny .bat postings?
Do people really still use .bat files?
I'm really curious. And as far as looping, I think that you can loop in bat files, but I really don't remember the syntax. Might be helpful to do a goolge search on DOS or batch files.
Chi Happens
0
Response Number 2
Name: zeroguy Date: August 22, 2003 at 19:00:03 Pacific
Reply:
Yeah, actually, I think they do, Chi. Batch files are like the DOS equivelant of *nix scripting (at least in my mind). Do people still use scripts?
Of course, there's far fewer who use batch files becuase fewer know an extensive amount of DOS commands. Most of the people that would know how are nix users. ;)
0
Response Number 3
Name: egkenny Date: August 22, 2003 at 20:07:50 Pacific
Reply:
This will loop from 1 to 255
for /L %%N in (1,1,255) do ping -n 1 192.168.1.%%N
0
Response Number 4
Name: egkenny Date: August 22, 2003 at 20:39:19 Pacific
Reply:
Here is a reference fot the batch FOR command in Windows 2000/XP: http://www.labmice.net/articles/batchcmds.htm
0
Response Number 5
Name: Chi Happens Date: August 22, 2003 at 21:53:58 Pacific
Reply:
wow, i didn't know they still used batch files. I guess I never realized how much they are/were used. I have always written applications (DOS/Windows) to do stuff...I guess I never knew how much you could do in bat files.
0
Response Number 6
Name: gorf Date: August 22, 2003 at 22:59:08 Pacific
Reply:
thx you all ____________________ ./bin/windows_sucks/
Just to put my two cents in about the "do people still use Batch files" comment...
Yes, I use them all the time to administer my Apache web servers and to interact with my C++ programs. I completely agree with Zeroguy... "Batch files are like the DOS equivelant of *nix scripting". I have always liked the command line, I suppose thats the reason I took a liking to the Gentoo Linux platform and the *nix shells and consoles... and the reason I still drop to DOS when I want to manipulate files or other tasks of the day.
Summary: I have been working on a project to make a bat file to remove known processes and files related to Antivirus 2009. I have gotten pretty far and just need a little help. I can't figure out how to use c...
Summary: I need some help with a bat file that I created. I am trying to make it stay minimized on my user's screens. Do I simply put Echo Off or @Echo Off in the bat file and where do I put it to take effec...
Summary: im useing notepat to make .bat files can some help me im trying to lear commands for .bat files like echo and cls i know some but where can i get more info on it? thx -gorf ...