当前位置:网站首页>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判断与的功能

边栏推荐
- Reptile practice (V): climbing watercress top250
- @GetMapping、@PostMapping 和 @RequestMapping详细区别附实战代码(全)
- Sql: stored procedures and triggers - Notes
- Four common ways and performance comparison of ArrayList de duplication (jmh performance analysis)
- JS operation DOM element (I) -- six ways to obtain DOM nodes
- @Detailed differences among getmapping, @postmapping and @requestmapping, with actual combat code (all)
- 1292_FreeROS中vTaskResume()以及xTaskResumeFromISR()的实现分析
- JS learning notes OO create suspicious objects
- Start the embedded room: system startup with limited resources
- 快讯:飞书玩家大会线上举行;微信支付推出“教培服务工具箱”
猜你喜欢

对话阿里巴巴副总裁贾扬清:追求大模型,并不是一件坏事

Sequoia China, just raised $9billion

guava:Collections. The collection created by unmodifiablexxx is not immutable

Persistence / caching of RDD in spark

华为在多个行业同时出击,吓人的技术让欧美企业瑟瑟发抖

抖音將推獨立種草App“可頌”,字節忘不掉小紅書?
![[interpretation of the paper] machine learning technology for Cataract Classification / classification](/img/0c/b76e59f092c1b534736132faa76de5.png)
[interpretation of the paper] machine learning technology for Cataract Classification / classification

Vit paper details

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

uni-app App端半屏连续扫码
随机推荐
[go][转载]vscode配置完go跑个helloworld例子
Hill | insert sort
The underlying implementation of string
数字化转型挂帅复产复工,线上线下全融合重建商业逻辑
The role of applicationmaster in spark on Yan's cluster mode
In JS, string and array are converted to each other (II) -- the method of converting array into string
string的底层实现
Enhance network security of kubernetes with cilium
Internet News: Geely officially acquired Meizu; Intensive insulin purchase was fully implemented in 31 provinces
[interpretation of the paper] machine learning technology for Cataract Classification / classification
VIM basic configuration and frequently used commands
Sdl2 source analysis 7: performance (sdl_renderpresent())
Nodejs教程之让我们用 typescript 创建你的第一个 expressjs 应用程序
JS get array subscript through array content
互联网快讯:吉利正式收购魅族;胰岛素集采在31省全面落地
npm run dev启动项目报错 document is not defined
JPEG2000-Matlab源码实现
What's the best way to get TFS to output each project to its own directory?
1292_ Implementation analysis of vtask resume() and xtask resume fromisr() in freeros
Leetcode topic [array] -118 Yang Hui triangle