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 9 posts 79 karma points
    Nov 20, 2020 @ 10:51
    Ilyas Balgabekov
    0

    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 1276 posts 4194 karma points c-trib
    Nov 20, 2020 @ 11:27
    Steve Morgan
    1

    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:

Draft