实现目的:每10s自动向创建指定文件夹并写入指定数目文件,文件中写入指定的内容。
使用方向举例:
1、可以检测nfs服务器文件同步的速度
2、将空磁盘填充到爆
…
@echo off &auther ming
:MING
set current_date=%date:~0,4%%date:~5,2%%date:~8,2%
::read current_date as a time point
set current_time=%time:~0,2%%time:~3,2%%time:~6,2%
:: read other time as another point
set filename=%current_date%%current_time%
::set time point add
mkdir %filename%
:: create a special name directory
for /l %%i in (1 1 10) do (
ipconfig > %~dp0\%filename%\%%i.txt
::use for to write in filename
)
::pause
ping -n 10 127.0.0.1>nul
goto MING