自动删除文件forfiles /p " D:DB_Backup " /d -7 /c "cmd /c echo deleting @file ... && del /f @path"注释:" D:DB_Backup "是文件所在目录,‘/d /7 /c’指超过7天的文件。