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 2 posts 72 karma points
    1 week ago
    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 1229 posts 4030 karma points c-trib
    1 week ago
    Steve Morgan
    0

    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