执行脚本
@ECHO OFF
set year=%date:~6,4%
set month=%date:~0,2%
set day=%date:~3,2%
set hour=%time:~0,2%
set minute=%time:~3,2%
set second=%time:~6,2%
set backupTime=%year%%month%%day%_%hour%%minute%%second%
set>>D:/IDE/databack/pc_path/environment-backup-%backupTime%.txt
批处理文件
设置自动执行任务
通过window的Task 管理设置一个定时任务,执行bat文件即可。