Couple Dos Commands:

default

 
FOR /L %g IN (1,1,254) DO ping -n 2 192.168.1.%g
:: Ping 192.168.1.1 - 192.168.1.254 two times

FOR /L %%g IN (%1,1,%2) DO start iexplore http://172.17.7.%%g
::  Open ie for each address in last octet to see if any webservers running

del /F /S /Q "C:\Documents and Settings\someUserName\Local Settings\Temporary Internet Files\*.*"
:: Delete cookies winxp ie

at 02:00 /every:m,t,w,th,f,s,su shutdown /r /f /l /d p:4:1 /t 60 /yes
:: Reboot computer at specific time, like a cron job
:: /d - list reason for shutdown
:: 4:1 - application:maintanance

sc
:: service control manager 

ncpa.cpl
:: brings up local area connections in explorer

netsh firewall show config
:: shows windows firewall config

netsh firewall set opmode disable
:: disables firewall

netsh firewall add portopening TCP 80 WebServer
:: opens port 80 as WebServer

netsh firewall delete portopening TCP 80
:: closes port 80

copy con filename.txt
:: Create a file prompting for input.
:: Start typing.
:: control-z to save file

type filename.txt
:: Show contents of a file

net print \\server-name\106hplj8000
:: To show print queue for a network printer:

dir syst??.*
:: ? matches one letter
:: * matches one or more letters 

type hello.txt
:: view file contents 

dir > dir.txt
:: redirects dir output to a file 

subst y: c:\www\substitutionFolder
:: creates a virtual drive of an existing folder 

subst driveY: /D
:: Delete drive link

subst
::  Display all substitited drives 
:: /? for help


echo %PATH%
:: prints path environment variables 

set PATH=C:\newFolder;%PATH%
:: add newFolder to path 

alt + space + n
:: minimze current window 

alt + space + cursorKeys
:: move window without a mouse

taskkill
:: kills task 

tasklist
:: list applications and their PID 

doskey /m
:: lists current macros

doskey /m > dosMacros.txt
:: saves current macros to a text file

doskey /macrofile=macro.txt
:: load a macro into doskey

Esc
;; clear to cursor
;; same as ^u on *nix

^ <-
:: Move back one word (Control - left arrow) in cmd
:: Same as meta-b in bash (emacs mode)

^ ->
:: Move forward one word (^ - right arrow)

DIR /A /B /S > namelist.txt
:: list filenames so you can see if over 255 limit

copy con test.txt
:: start editing a file called test.txt
:: ^Z enter - to save file

copy test.txt con
:: prints test.txt to console screen

:: :::::::::::::::
:: reserved names:
:: :::::::::::::::
:: CON
:: PRN
:: AUX
:: NUL
:: COM1
:: COM2
:: COM3
:: COM4
:: COM5
:: COM6
:: COM7
:: COM8
:: COM9
:: LPT1
:: LPT2
:: LPT3
:: LPT4
:: LPT5
:: LPT6
:: LPT7
:: LPT8
:: LPT9



default