【windows】bat脚本、批处理文件

::当前盘符
@echo current pan : %~d0

::当前路径
@echo current path : %cd%

::当前bat文件路径
@echo the bat's path : %~dp0

:: /a表示是个表达式 1M 1024byte * 1024 = 1MB
set /a onem=1024*1024
for /l %%i in (1,1,100) do fsutil file createnew %~dp001_num_%%i_1MB_file.txt %onem%
:: 从1 开始,间隔为1,到100结束,包括100

原文地址:https://www.cnblogs.com/dysonnnn/p/12721271.html