当前位置:网站首页>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判断与的功能
边栏推荐
- Start the embedded room: system startup with limited resources
- Aggregate function with key in spark
- 技术分享 | 抓包分析 TCP 协议
- guava:Collections. The collection created by unmodifiablexxx is not immutable
- Four common ways and performance comparison of ArrayList de duplication (jmh performance analysis)
- The use method of string is startwith () - start with XX, endswith () - end with XX, trim () - delete spaces at both ends
- 记一次清理挖矿病毒的过程
- 在Pi和Jetson nano上运行深度网络,程序被Killed
- Microsoft technology empowerment position - February course Preview
- 互联网快讯:吉利正式收购魅族;胰岛素集采在31省全面落地
猜你喜欢
快讯:飞书玩家大会线上举行;微信支付推出“教培服务工具箱”
[in depth learning] pytorch 1.12 was released, officially supporting Apple M1 chip GPU acceleration and repairing many bugs
Digital transformation takes the lead to resume production and work, and online and offline full integration rebuilds business logic
[sliding window] group B of the 9th Landbridge cup provincial tournament: log statistics
[Li Kou brushing questions] one dimensional dynamic planning record (53 change exchanges, 300 longest increasing subsequence, 53 largest subarray and)
Four common ways and performance comparison of ArrayList de duplication (jmh performance analysis)
[redis design and implementation] part I: summary of redis data structure and objects
缓存更新策略概览(Caching Strategies Overview)
爬虫实战(五):爬豆瓣top250
袁小林:安全不只是标准,更是沃尔沃不变的信仰和追求
随机推荐
Thinking about agile development
JPEG2000-Matlab源码实现
Redistemplate common collection instructions opsforhash (IV)
Ravendb starts -- document metadata
跨分片方案 总结
Forward maximum matching method
[in depth learning] pytorch 1.12 was released, officially supporting Apple M1 chip GPU acceleration and repairing many bugs
Tips for web development: skillfully use ThreadLocal to avoid layer by layer value transmission
抖音將推獨立種草App“可頌”,字節忘不掉小紅書?
Reinforcement learning - learning notes 5 | alphago
guava:Collections.unmodifiableXXX创建的collection并不immutable
【力扣刷题】一维动态规划记录(53零钱兑换、300最长递增子序列、53最大子数组和)
Summary of cross partition scheme
[Digital IC manual tearing code] Verilog automatic beverage machine | topic | principle | design | simulation
[go][转载]vscode配置完go跑个helloworld例子
guava: Multiset的使用
The difference between break and continue in the for loop -- break completely end the loop & continue terminate this loop
R3live notes: image processing section
Comparison between multithreaded CAS and synchronized
[redis design and implementation] part I: summary of redis data structure and objects