当前位置:网站首页>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
边栏推荐
- jvm:大对象在老年代的分配
- 互联网快讯:吉利正式收购魅族;胰岛素集采在31省全面落地
- Guava: three ways to create immutablexxx objects
- 50个常用的Numpy函数解释,参数和使用示例
- Search map website [quadratic] [for search map, search fan, search book]
- 抖音將推獨立種草App“可頌”,字節忘不掉小紅書?
- The role of applicationmaster in spark on Yan's cluster mode
- Absolute primes (C language)
- Technology sharing | packet capturing analysis TCP protocol
- [go][转载]vscode配置完go跑个helloworld例子
猜你喜欢
PostgreSQL install GIS plug-in create extension PostGIS_ topology
数字化转型挂帅复产复工,线上线下全融合重建商业逻辑
Absolute primes (C language)
跨分片方案 总结
Microsoft technology empowerment position - February course Preview
uni-app App端半屏连续扫码
guava:Collections.unmodifiableXXX创建的collection并不immutable
抖音将推独立种草App“可颂”,字节忘不掉小红书?
Quick news: the flybook players' conference is held online; Wechat payment launched "education and training service toolbox"
Sparkshuffle process and Mr shuffle process
随机推荐
Start the embedded room: system startup with limited resources
Sequoia China, just raised $9billion
Comparison between multithreaded CAS and synchronized
Absolute primes (C language)
The relationship between root and coefficient of quadratic equation with one variable
NPM run dev start project error document is not defined
Persistence / caching of RDD in spark
爬虫实战(五):爬豆瓣top250
Sparkshuffle process and Mr shuffle process
跨分片方案 总结
[Li Kou brushing questions] one dimensional dynamic planning record (53 change exchanges, 300 longest increasing subsequence, 53 largest subarray and)
Z function (extended KMP)
Tiktok will push the independent grass planting app "praiseworthy". Can't bytes forget the little red book?
Huawei has launched attacks in many industries at the same time, and its frightening technology has made European and American enterprises tremble
Redistemplate common collection instructions opsforzset (VI)
对话阿里巴巴副总裁贾扬清:追求大模型,并不是一件坏事
Enhance network security of kubernetes with cilium
Unity3D学习笔记6——GPU实例化(1)
C how to set two columns comboboxcolumn in DataGridView to bind a secondary linkage effect of cascading events
bat脚本学习(一)