批处理:将本月临时文件移动到历史目录中
chcp 936 @echo off set month=%date:~2,2%%date:~5,2% set year=%date:~0,4% echo %year% echo %month% chcp 65001 set MonthFolder=F:\我的工作\%year%\%month% set YearFolder=F:\我的工作\%year% if not exist %YearFolder% ( rem 创建目录年目录=%YearFolder% md %YearFolder% ) if not exist %MonthFolder% ( rem 创建目录月目录=%MonthFolder% md %MonthFolder% ) set MyFolder=F:\我的工作\本月临时文件 cd %MyFolder% rem 切换当前路径=%MyFolder% move /y %MyFolder%\* %MonthFolder%
标签:set,批处理,备份,rem,echo,MonthFolder%,临时文件,目录 From: https://www.cnblogs.com/wxp100/p/18057102