Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Ilyas Balgabekov 21 posts 132 karma points
    Nov 20, 2020 @ 10:51
    Ilyas Balgabekov

    Is there a way with Umbraco tools to clear the logs and the App_data folder by the sceduller. Or I should do it from another application/script?

  • Steve Morgan 1302 posts 4352 karma points c-trib
    Nov 20, 2020 @ 11:27
    Steve Morgan

    Hi Ilyas,

    I create a batch script on the server.. something like cleanupoldlogs.bat - this will kill anything older than 30 days

    forfiles /p "C:\data\websites\sitenamehere\site\App_Data\Logs" /s /m *.* /D -30 /C "cmd /c del @path"

    Then add that to a windows scheduled task.

    Nice and simple.

    Not sure you want to be just deleting the app_data folder without knowing why and what you're doing though.

Please Sign in or register to post replies

Write your reply to: