当前位置:网站首页>bat脚本学习(一)
bat脚本学习(一)
2022-07-06 13:32:00 【qq_1410888563】
转载:BAT批处理文件 set命令详解_望语挽枫的博客-CSDN博客_批处理set命令
转载:BAT脚本学习篇——基本语法_Word哥的博客-CSDN博客_bat脚本基本语法
首先可以按照VScode进行脚本写入,再按照code runner进行脚本测试。vscode真的强无敌。

目录
一:打印信息 :echo

二:空一行:echo. (逗号实现空一行)

三:注释方式
:: 注释 (不显示)
rem 注释 (显示)
@ 注释 (在终端不显示,但可以执行@里面的内容,可以隐藏消息)

四:判断语句的实现
其中A代表的是空格。空格要加。
判断是否定义了一个变量

判断是否是否存在一个文件

五:建立链接

1.复制文件 :/h

2.创建文件夹快捷方法: /j
六:启动程序
格式为 : start + 空格 + 引号 +空格+ 程序目录


七:实现调用其他的bat文件
call:调用另一个批处理文件(如果不用call而直接调用别的批处理文件,那么执行完那个批处理文件后将无法返回当前文件并执行当前文件的后续命令)。
1.先为其他文件夹创建一个快捷方式
2.调用call命令执行其他的bat文件
3.为其他文件夹创建新的快捷方式

八:%cd%和%~dp0的作用
%cd% :获取当前文件的工作路径
%~dp0 : 获取当前文件的只可以用在批处理文件中,它是由它所在的批处理文件的目录位置决定的,是批处理,文件所在的盘符:+路径

九:实现if判断与的功能

边栏推荐
- Digital transformation takes the lead to resume production and work, and online and offline full integration rebuilds business logic
- C how to set two columns comboboxcolumn in DataGridView to bind a secondary linkage effect of cascading events
- MySQL removes duplicates according to two fields
- Acdreamoj1110 (multiple backpacks)
- b站视频链接快速获取
- Ravendb starts -- document metadata
- Run the deep network on PI and Jetson nano, and the program is killed
- JPEG2000-Matlab源码实现
- string的底层实现
- 【滑动窗口】第九届蓝桥杯省赛B组:日志统计
猜你喜欢

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

Shake Sound poussera l'application indépendante de plantation d'herbe "louable", les octets ne peuvent pas oublier le petit livre rouge?

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

1292_ Implementation analysis of vtask resume() and xtask resume fromisr() in freeros

Four common ways and performance comparison of ArrayList de duplication (jmh performance analysis)

Numpy download and installation

Microsoft technology empowerment position - February course Preview

The difference between break and continue in the for loop -- break completely end the loop & continue terminate this loop

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

Caching strategies overview
随机推荐
Redistemplate common collection instructions opsforlist (III)
Comparison between multithreaded CAS and synchronized
WEB功能测试说明
guava:Collections.unmodifiableXXX创建的collection并不immutable
High precision face recognition based on insightface, which can directly benchmark hongruan
guava:创建immutableXxx对象的3种方式
[go][reprint]vscode run a HelloWorld example after configuring go
Numpy download and installation
红杉中国,刚刚募资90亿美元
Digital transformation takes the lead to resume production and work, and online and offline full integration rebuilds business logic
c语言char, wchar_t, char16_t, char32_t和字符集的关系
First batch selected! Tencent security tianyufeng control has obtained the business security capability certification of the ICT Institute
[Li Kou brushing questions] one dimensional dynamic planning record (53 change exchanges, 300 longest increasing subsequence, 53 largest subarray and)
The role of applicationmaster in spark on Yan's cluster mode
C# 如何在dataGridView里设置两个列comboboxcolumn绑定级联事件的一个二级联动效果
R语言做文本挖掘 Part4文本分类
Persistence / caching of RDD in spark
FZU 1686 龙之谜 重复覆盖
PostgreSQL install GIS plug-in create extension PostGIS_ topology
Sequoia China, just raised $9billion