[windows] bat script, batch file

Time:2020-12-22

: current drive letter
@echo current pan : %~d0

:: current path
@echo current path : %cd%\

:: current bat file path
@echo the bat’s path : %~dp0

:: / A is an expression 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%
:: starts at 1 with an interval of 1 and ends at 100, including 100