批处理BAT加强函数代码使用说明第1/3页
批处理BAT加强函数代码使用说明第1/3页
发布时间:2016-12-28 来源:查字典编辑
摘要:文章结构1.所有内置命令的帮助信息2.环境变量的概念3.内置的特殊符号(实际使用中间注意避开)4.简单批处理文件概念5.附件1tmp.txt...

文章结构

1. 所有内置命令的帮助信息

2. 环境变量的概念

3. 内置的特殊符号(实际使用中间注意避开)

4. 简单批处理文件概念

5. 附件1 tmp.txt

6. 附件2 sample.bat

######################################################################

1. 所有内置命令的帮助信息

######################################################################

ver

cmd /?

set /?

rem /?

if /?

echo /?

goto /?

for /?

shift /?

call /?

其他需要的常用命令

type /?

find /?

findstr /?

copy /?

______________________________________________________________________

下面将所有上面的帮助输出到一个文件

echo ver >tmp.txt

ver >>tmp.txt

echo cmd /? >>tmp.txt

cmd /? >>tmp.txt

echo rem /? >>tmp.txt

rem /? >>tmp.txt

echo if /? >>tmp.txt

if /? >>tmp.txt

echo goto /? >>tmp.txt

goto /? >>tmp.txt

echo for /? >>tmp.txt

for /? >>tmp.txt

echo shift /? >>tmp.txt

shift /? >>tmp.txt

echo call /? >>tmp.txt

call /? >>tmp.txt

echo type /? >>tmp.txt

type /? >>tmp.txt

echo find /? >>tmp.txt

find /? >>tmp.txt

echo findstr /? >>tmp.txt

findstr /? >>tmp.txt

echo copy /? >>tmp.txt

copy /? >>tmp.txt

type tmp.txt

______________________________________________________

######################################################################

2. 环境变量的概念

######################################################################

_____________________________________________________________________________

C:Program Files>set

ALLUSERSPROFILE=C:document. and SettingsAll Users

CommonProgramFiles=C:Program FilesCommon Files

COMPUTERNAME=FIRST

ComSpec=C:WINNTsystem32cmd.exe

NUMBER_OF_PROCESSORS=1

OS=Windows_NT

Os2LibPath=C:WINNTsystem32os2dll;

Path=C:WINNTsystem32;C:WINNT;C:WINNTsystem32WBEM

PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

PROCESSOR_ARCHITECTURE=x86

PROCESSOR_IDENTIFIER=x86 Family 6 Model 6 Stepping 5, GenuineIntel

PROCESSOR_LEVEL=6

PROCESSOR_REVISION=0605

ProgramFiles=C:Program Files

PROMPT=$P$G

SystemDrive=C:

SystemRoot=C:WINNT

TEMP=C:WINNTTEMP

TMP=C:WINNTTEMP

USERPROFILE=C:document. and SettingsDefault User

windir=C:WINNT

_____________________________________________________________________________

当前1/3页123下一页阅读全文

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新DOS/BAT学习
热门DOS/BAT学习
脚本专栏子分类