0

I am working with SharePoint on prem 2010. I have to propose a non-coding solution for one a retention/document archival job. Basically once a document is uploaded, after three years (we can calculate 3 years based on the created date assigned by SharePoint) we would like to copy/move it over to a different library under a different site collection's site.Once the move is performed then the document should be deleted from the Source library.

Any help is appreciated, thanks in advance.

  • I don't know if a non-coding solution exists but you can do it with a small piece of PowerShell script and windows task scheduler. I did similar things many times. – newbie Dec 19 '18 at 15:50
  • Can you share some more info by an example or so, would be helpful. – mdevm Dec 19 '18 at 17:37
1

If you are able to use PowerShell, you can use these scripts to copy files from one library to another. It will copy files only, if you have a folder structure, you should look at this link

You can schedule a job using windows task scheduler to work every day. Also, add date control to this code, and it will work for you

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue;
cls

$sWeb=Get-SPWeb "http://sourceweb/"
$sList=$sWeb.Lists | ?{$_.Title -eq "SourceLib"}

$dWeb=Get-SPWeb "http://destinationweb"
$dList=$dWeb.Lists | ?{$_.Title -eq "DestinationLib"}

$RootFolder=$sList.RootFolder
$RootItems=$RootFolder.Files

foreach($RootItem in $RootItems)
{
        $sBytes = $RootItem.OpenBinary() 
        $dFile = $dList.RootFolder.Files.Add($RootItem.Name, $sBytes, $true)        
}
1

You could use Record center site template to archive document. For more detailed information, refer to the article below.

Step by step configuring document archival in SharePoint 2010.

And you also could use workflow to archive document. For more detailed information, refer to the article below.

Archive SharePoint Library Documents.

https://www.kalmstrom.com/Tips/SharePointArchiveDocs.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.