::當前盤符 @echo current pan : %~d0 ::當前路徑 @echo current path : %cd%\ ::當前bat文件路徑 @echo the bat's path : %~dp0 :: /a表示是個表達式 1M 1024byte 1024 = 1MB set /a ...
::當前盤符
@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