DOS Batch 目录中的DOS列表项

@echo off >nullfile.txt
dir /b /o D:\www.goldsgymdirect.co.uk\images\var\

DOS Batch 为所有网络连接启用systray图标

@FOR /F "DELIMS=" %%? IN ('REG QUERY HKLM\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318} /S^|FINDSTR \\Connection$') DO @REG ADD "%%?" /V ShowIcon /T REG_DWORD /D 1 /F>NUL

DOS Batch 删除Seapine Surround SCM绑定

attrib -r *.* /s
del /s *.MySCMServerInfo
del /s *.vspscc

DOS Batch 更改cmd shell显示模式

@ECHO OFF
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REM
REM FILENAME		 : DOSMODE.BAT
REM	
REM DESCRIPTION		 : Change console mode to display as in old DOS Mode
REM 
REM AUTHOR		 : Napoleon Arouldas S. (princeofcode@gmail.com)
REM 
REM WEB                  : http://neps.in 
REM	
REM DATE WRITTEN	 : Sunday, October 07, 2007 6:10:58 PM
REM
REM COMMENTS/REMARKS	 : Use it, when you would like to have a big pretty  looking fonts for your
REM                             cmd shell in windows. Works with windows XP
REM
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MODE CON LINES=25 COLS=80

DOS Batch 使用Dir命令报告快速文件和子目录

dir /s > filename.txt

DOS Batch 从命令行停止Windows Update重新启动

sc stop wuauserv

DOS Batch 获取当前日期和时间的代码。

FOR /F "tokens=1-6 delims=/ " %%i in ('date/t') do set currentdate=%%i-%%j-%%k-%%l
FOR /F "tokens=1-6 delims=: " %%i in ('time/t') do set currenttime=%%i-%%j-%%k

DOS Batch wget - 下载完整的网页

wget --page-requisites --html-extension --convert-links --span-hosts --no-check-certificate http://google.com

DOS Batch 等待批处理文件的用户输入(暂停)(命令行,cmd,dos提示符......)

pause

DOS Batch Windows批处理文件中的特殊变量

rem special variables for batch files

@echo off


echo fully qualified name of this batch file: 

echo %~fn0


echo path to here: 

echo %~dp0


echo arguments passed (if any):

echo %*