当前位置:网站首页>Bat script learning (I)
Bat script learning (I)
2022-07-06 21:54:00 【qq_ one billion four hundred and ten million eight hundred and 】
Reprint :BAT Batch file set Detailed command _ Wang Yu Wan Feng's blog -CSDN Blog _ The batch set command
Reprint :BAT Script learning —— Basic grammar _Word Brother's blog -CSDN Blog _bat Basic script syntax
First, you can follow the VScode Script writing , Again according to code runner Conduct script testing .vscode Really invincible .

Catalog
Two : A blank line :echo. ( Comma realizes an empty line )
Four : Implementation of judgment statement
6、 ... and : Start the program
7、 ... and : Implementation calls other bat file
8、 ... and :%cd% and %~dp0 The role of
One : Print information :echo

Two : A blank line :echo. ( Comma realizes an empty line )

3、 ... and : Annotation mode
:: notes ( No display )
rem notes ( Show )
@ notes ( The terminal does not display , But it can do @ What's in it , You can hide messages )

Four : Implementation of judgment statement
among A Represents a space . Space should be added .
Determine whether a variable is defined

Determine whether a file exists

5、 ... and : Building links

1. Copy file :/h

2. Create folder shortcuts : /j
6、 ... and : Start the program
The format is : start + Space + quotes + Space + Program directory


7、 ... and : Implementation calls other bat file
call: Call another batch file ( If not call And directly call other batch files , After executing the batch file, you will not be able to return to the current file and execute the subsequent commands of the current file ).
1. First create a shortcut for other folders
2. call call Command to execute other bat file
3. Create new shortcuts for other folders

8、 ... and :%cd% and %~dp0 The role of
%cd% : Get the working path of the current file
%~dp0 : Gets the of the current file Can only be used in batch files , It is determined by the directory location of the batch file it is in , It's batch processing , The drive letter where the file is located :+ route

Nine : Realization if The function of judgment and

边栏推荐
- From campus to Tencent work for a year of those stumbles!
- 14年本科毕业,转行软件测试,薪资13.5K
- Huawei has launched attacks in many industries at the same time, and its frightening technology has made European and American enterprises tremble
- 关于char[]数组通过scanf赋值使用上的一些问题。。
- Binary tree node at the longest distance
- numpy 下载安装
- PostgreSQL 安装gis插件 CREATE EXTENSION postgis_topology
- 抖音将推独立种草App“可颂”,字节忘不掉小红书?
- Why does MySQL index fail? When do I use indexes?
- 爬虫实战(五):爬豆瓣top250
猜你喜欢

numpy 下载安装

Method return value considerations

互联网快讯:吉利正式收购魅族;胰岛素集采在31省全面落地

C how to set two columns comboboxcolumn in DataGridView to bind a secondary linkage effect of cascading events
![[asp.net core] set the format of Web API response data -- formatfilter feature](/img/95/b7e7b5e9e9ac1d9295c17640beccb3.jpg)
[asp.net core] set the format of Web API response data -- formatfilter feature

Efficiency tool +wps check box shows the solution to the sun problem

Yuan Xiaolin: safety is not only a standard, but also Volvo's unchanging belief and pursuit

爬虫实战(五):爬豆瓣top250

Basic introduction of figure

红杉中国,刚刚募资90亿美元
随机推荐
Z function (extended KMP)
在Pi和Jetson nano上运行深度网络,程序被Killed
Redistemplate common collection instructions opsforzset (VI)
20 large visual screens that are highly praised by the boss, with source code templates!
guava: Multiset的使用
PostgreSQL modifies the password of the database user
Leetcode topic [array] -118 Yang Hui triangle
MySQL removes duplicates according to two fields
中国白酒的5场大战
Divide candy
[Li Kou brushing questions] one dimensional dynamic planning record (53 change exchanges, 300 longest increasing subsequence, 53 largest subarray and)
关于程序员的职业操守,从《匠艺整洁之道》谈起
Univariate cubic equation - relationship between root and coefficient
PostgreSQL 修改数据库用户的密码
Four common ways and performance comparison of ArrayList de duplication (jmh performance analysis)
抖音將推獨立種草App“可頌”,字節忘不掉小紅書?
Why does MySQL index fail? When do I use indexes?
It's not my boast. You haven't used this fairy idea plug-in!
Sparkshuffle process and Mr shuffle process
R language for text mining Part4 text classification