当前位置:网站首页>[batch dos-cmd command - summary and summary] - output / display command - echo
[batch dos-cmd command - summary and summary] - output / display command - echo
2022-06-27 07:51:00 【dssgresadfsrgre】
One 、 Show echo On / off state of
echo: Nothing is added after the instruction

Two 、 adjustment echo On / off state of
Open a new one at a time cmd window , Will be opened by default echo state .
Let's try to close it first .
echo off: close echo The state of

Open it again .
echo on: open echo The state of

It can also be seen from the above , It will be hidden when it is closed cmd The current working path of the window .
in addition , If you put dos The command is placed in a bat In the document , Prior to echo off , The current working path will not be displayed later , It will not display all the instructions that have been executed .

above bat The results of file execution are as follows , After execution echo off after ,echo 234、pause These two instructions disappear .

3、 ... and 、 Show / Print / Output the result of execution or operation
echo [ data ]: Data can be constant , It can also be a variable , Like system variables .
Common system variables are shown in the following table :
| Variable name | Range | describe |
%ALLUSERSPROFILE% | Local | return “ All user profiles ” The location of . |
%APPDATA% | Local | Returns where the application stores data by default . |
%CD% | Local | Returns the current directory string . |
%CMDCMDLINE% | Local | Return to start the current Cmd.exe The exact command line for . |
%CMDEXTVERSION% | System | Returns the current “ Command handler extension ” Version number of . |
%COMPUTERNAME% | System | Returns the name of the computer . |
%COMSPEC% | System | Returns the exact path of the command line interpreter executable . |
%DATE% | System | Return current date . Use with date /t Command the same format . from Cmd.exe Generate . of date Command details , see also Date. |
%ERRORLEVEL% | System | Returns the error code of the previous command . Errors are usually represented by nonzero values . |
%HOMEDRIVE% | System | Returns the local workstation drive letter connected to the user's home directory . Set based on the home directory value . The user home directory is in “ Local users and groups ” Specified in the . |
%HOMEPATH% | System | Return the full path of the user's home directory . Set based on the home directory value . The user home directory is in “ Local users and groups ” Specified in the . |
%HOMESHARE% | System | Return the network path of the user's shared home directory . Set based on the home directory value . The user home directory is in “ Local users and groups ” Specified in the . |
%LOGONSERVER% | Local | Returns the name of the domain controller that verifies the current login session . |
%NUMBER_OF_PROCESSORS% | System | Specifies the number of processors installed on the computer . |
%OS% | System | Returns the operating system name .Windows 2000 Will display the operating system as Windows NT. |
%PATH% | System | Specify the search path for the executable . |
%PATHEXT% | System | Returns a list of file extensions considered executable by the operating system . |
%PROCESSOR_ARCHITECTURE% | System | Return the chip architecture of the processor . value :x86 or IA64( be based on Itanium). |
%PROCESSOR_IDENTFIER% | System | Return processor description . |
%PROCESSOR_LEVEL% | System | Returns the model number of the processor installed on the computer . |
%PROCESSOR_REVISION% | System | Returns the version number of the processor . |
%PROMPT% | Local | Returns the command prompt settings for the current interpreter . from Cmd.exe Generate . |
%RANDOM% | System | return 0 To 32767 Any decimal number between . from Cmd.exe Generate . |
%SYSTEMDRIVE% | System | Return contains Windows Server operating system root directory ( The root directory of the system ) The driver of . |
%SYSTEMROOT% | System | return Windows Location of the server operating system directory . |
%TEMP% and %TMP% | Systems and users | Returns the default temporary directory used by the application available to the currently logged in user . Some applications need to TEMP, Other applications need TMP. |
%TIME% | System | Return current time . Use with time /t Command the same format . from Cmd.exe Generate . of time Command details , see also Time. |
%USERDOMAIN% | Local | Returns the name of the domain containing the user account . |
%USERNAME% | Local | Returns the name of the currently logged in user . |
%USERPROFILE% | Local | Returns the location of the current user's profile . |
%WINDIR% | System | Returns the location of the operating system directory . |
(1) Print a constant

(2) Print a system variable

边栏推荐
- R language analyzing wine data
- 「短视频」临夏消防救援支队开展消防安全培训授课
- [Software Engineering] software engineering review outline of Shandong University
- 若xn>0,且x(n+1)/xn>1-1/n(n=1,2,...),证明级数∑xn发散
- How to view program running time (timer) in JS
- PayPal账户遭大规模冻结!跨境卖家如何自救?
- 【11. 二维差分】
- What is a flotation machine?
- C how to call line and rows when updating the database
- Etcd教程 — 第五章 Etcd之etcdctl的使用
猜你喜欢

JS to determine whether the number entered by the user is a prime number (multiple methods)

【批处理DOS-CMD命令-汇总和小结】-cmd的内部命令和外部命令怎么区分,CMD命令和运行(win+r)命令的区别,

JS to judge the odd and even function and find the function of circular area

Experience record of Luogu's topic brushing

Online text digit recognition list summation tool

JS use switch to output whether the result is qualified
![[Software Engineering] software engineering review outline of Shandong University](/img/38/2c783df56b50dee3bbb908f6f3e70e.png)
[Software Engineering] software engineering review outline of Shandong University

【11. 二维差分】

大厂工作十年,年薪40万突然被裁员,公司想抛弃你,一分情面都不会留

Win10 how to manage startup items?
随机推荐
准备好迁移上云了?请收下这份迁移步骤清单
JS to judge the odd and even function and find the function of circular area
期货反向跟单靠谱吗?
[Software Engineering] software engineering review outline of Shandong University
语音信号处理-概念(四):傅里叶变换、短时傅里叶变换、小波变换
File and multipartfile overview
js中判断奇偶的函数,求圆面积的函数
Publications under nature, science and cell
语音信号处理-概念(一):时谱图(横轴:时间;纵轴:幅值)、频谱图(横轴:频率;纵轴:幅值)--傅里叶变换-->时频谱图【横轴:时间;纵轴:频率;颜色深浅:幅值】
log4j:WARN No such property [zipPermission] in org. apache. log4j. RollingFileAppender.
The 6th Blue Bridge Cup
「短视频」临夏消防救援支队开展消防安全培训授课
L'enquête en aveugle a montré que les femmes étaient meilleures que les hommes.
js输出形状
【12. 最大连续不重复子序列】
js例题打印1-100之间所有7的倍数的个数及总和
Binary tree structure and heap structure foundation
R language analyzing wine data
JS to determine whether the result is qualified, the range is 0-100, otherwise re-enter
【批处理DOS-CMD命令-汇总和小结】-将文件夹映射成虚拟磁盘——subst