forfiles /p C:\test /s /m *.txt /d -7 /c "cmd /c del @path" 转载于:https://blog.51cto.com/zhaodongwei/1877836