.bat 批处理 手册 教程

有时候bat写个脚本 还是挺方便的,网上也没有不错的手册,有时间再整理看吧。网上找几个,先留存。

系统变量 %USERPROFILE%
https://blog.csdn.net/ztx114/article/details/90599107

BAT详细手册
https://www.cnblogs.com/AchillesHuang/archive/2006/09/06/BATManual.html

批处理入门手册
https://www.w3cschool.cn/pclrmsc/

常用:

%USERPROFILE% =C:\Users\用户名
 
%SystemRoot% =C:\WINDOWS
 
%SystemDrive% =C:
 
%APPDATA% =C:\Users\用户名\AppData\Roaming
 
%LOCALAPPDATA% =C:\Users\用户名\AppData\Local
 
%windir% =C:\WINDOWS
 
%Path% =C:\Windows\system32;C:\Windows; 
 
%ProgramData% =C:\ProgramData
 
%ProgramFiles% =C:\Program Files
 
%ProgramFiles(x86)% =C:\Program Files (x86)
 
其他:

%ALLUSERSPROFILE% =C:\ProgramData
 
%CommonProgramFiles% =C:\Program Files\Common Files
 
%CommonProgramFiles(x86)% =C:\Program Files (x86)\Common Files
 
%CommonProgramW6432% =C:\Program Files\Common Files
 
%COMPUTERNAME% =MyPC
 
%ComSpec% =C:\WINDOWS\system32\cmd.exe
 
%HOMEDRIVE% =C:
 
%HOMEPATH% =\Users\用户名
 
%LOGONSERVER% =\\MicrosoftAccount
 
%OS% =Windows_NT
 
%ProgramW6432% =C:\Program Files  
 
%PUBLIC% =C:\Users\Public 
 
%TEMP% =C:\Users\用户名\AppData\Local\Temp
 
%TMP% =C:\Users\用户名\AppData\Local\Temp
 
%USERDOMAIN% =MyPC 
 
%USERNAME% =用户名

posted @ 2022-04-24 15:31  彭成刚  阅读(212)  评论(1编辑  收藏  举报