2017-09-07 39 views

回答

2
** open into note pad and 
    delete script : ** 

      REM Remove files older than 30 days 
      forfiles /p 「C:\deletefolder name」 /s /m *.* /c "cmd /c Del @path" /d -30 


    1 . Here C:\deletefolder path folder and save file name (like downloadcleanup.bat)with .bat extension 
    2 . Open tack scheduler 
    3.Right Click to Task Scheduler option and then select new tack schedule 
    4. Select .bat file path you have saved 
    5.and also you can see step into below images: 
    6. Continue to finish and you can seen your tast in your task scheduler and select to run at a time and also run automatically by schedule time 
     [1]: https://i.stack.imgur.com/Em8f5.png 
     [2]: https://i.stack.imgur.com/EXn9b.png 
     [3]: https://i.stack.imgur.com/ZqaCe.png 
     [4]: https://i.stack.imgur.com/S8Lxy.png 
     [5]: https://i.stack.imgur.com/lGqxX.png 
     [6]: https://i.stack.imgur.com/QGFRL.png 
     [7]: https://i.stack.imgur.com/a0RRq.png 
     [8]: https://i.stack.imgur.com/8L0NC.png 
     [9]: https://i.stack.imgur.com/7v9SV.png 
0

你可以寫在你最喜歡的語言(例如PowerShell的或Python)腳本,將定期檢查下載目錄,並刪除基於它們的時間戳不必要的文件。但是,您應該小心,並徹底測試您的腳本 - 您必須確保它按預期工作,並且不會刪除仍然是實際的文件。