试图删除名为“存档”的目录中的文件。如果不具体地输入每个目录,我就无法弄清楚如何做到这一点。在序列号(12345)目录下还有其他目录。
示例条目是:.\customer\12345\archive .\customer2\54321\archive
/p .“/s /m "*.zip”/d -90 -c "cmd /c del @path
我看过https://serverfault.com/questions/49614/delete-files-older-than-x-days,https://stackoverflow.com/questions/9746778/ms-dos-batch-delete-old-files-in-directory/9747065#9747065和https://stackoverflow.com/questions/324267/batch-file-to-delete-files-older-than-a-specified-date/1180746#1180746都没有用
提亚
发布于 2014-12-29 20:14:32
看看这对你有用吗。我使用类似的东西清除日志文件。
forfiles /P C:\pathtofile /S /D -90 /M *.zip /C "cmd /c del @file"https://unix.stackexchange.com/questions/176641
复制相似问题