Lets imagine for a second that you have a lot of content Authors, and they are creating new items every day. At some point in the future, these items need to be moved to an Archive. Out of the box Sitecore has a functionality of Archiving Items, but it all goes into the Archive Application that you can access from Desktop > All Applications > Archive
I would like to achieve something different, I would like to move items from News folder to News Archive folder, illustrated below:
In order to achieve this, you will need to create a News Template with certain fields, see the screenshot below:
So then you will create a News item based on the News Template you just created.
You should see something similar to the screenshot below:
After you have all the items created in Sitecore Content Editor, now lets go to the Visual Studio and write some code:
After you build and deploy the code, you will need to add some custom Configurations. So go ahead into the folder Website>App_Config>Include>Project>ItemMoving.config and insert the code below, this will patch the actual Sitecore.config
So this agent will execute every minute, and search for the Expiration Date within the items, that are in the News (Source Folder) and move the expired files to the News Archive (Destination folder). If you have any questions do not hesitate to ask.