locked
MOSS 2007: automatic delete of old list items RRS feed

  • Question

  • Hi,

    I have a big list in MOSS 2007; since that items in this list have a lot of files attached and the list is growing very fast, I need to schedule a task that deletes a number of old entries based on the date (for example, every day delete items older than a year).

    Is there an easy way to do that?

    Thank you


    • Edited by maurice77 Tuesday, July 2, 2013 8:19 AM
    Tuesday, July 2, 2013 8:15 AM

Answers

  • Hello,

    You can create custom timer job and schedule it for daily. Timer job will run everyday and  delete the items from list if more than 1 year old. You can use CAML query to get the 1 year old items.

    To create timer job:

    http://www.andrewconnell.com/Creating-Custom-SharePoint-Timer-Jobs

    Try with belwo query:

    <Where><Leq><FieldRef Name="Created" /><Value Type="DateTime"><Today OffsetDays='365'></Value></Leq></Where>
    Hope it could help


    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Please feel free to unmark answer if does not resolves your problem.

    Tuesday, July 2, 2013 8:36 AM
    Moderator