So from my point of view you have a few things you need to do here.
- If you don't want to use your site's task list, create a new task list, otherwise you can use the one currently on your site.
- Create a new SharePoint 2013 WF and attach to your document library.
- Configure it to run when an item is added
- My suggestion is to add the step "Wait for Field Change in Current Item" and point it at your expiry date (unless that is a required field). This way you workflow will not fire until the expiry date is set.
- Next add a step to create a new item in the task list. Set the due date to the expiry date document and set the title to the name of the document.
- If you want to get fancy you can add a hyperlink field to your task list that points back to your document (Laura Rogers has a great explanation of this: http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=196)
To deal with the documents you have already you are going to have to whip out some PowerShell:
$spWeb = Get-SPWeb <URL of Site>
$spSourceLib = $spWeb.TryGetList(<LibraryName)
$spDestTaskList = $spWeb.TryGetList(<ListName>)
$libRoot = $spSourceLib.RootFolder() #need even if you don't have folders.
$listItems = @()
foreach($listItem in $listItems)
$newTaskItem = spDesTaskList.Items.Add();
$newTaskItem["Title"] = $listItem["Name"];
$newTaskItem["DueDate"] = $listItem["ExpireDate"]
function GetFileList($spFolder, $listItems)
#First deal with the files.
foreach($spFile in $spFolder.Files)
$spItem = $spFile.Item;
$listItems += $spItem;
#next recursively call for each folder in library
foreach($spSubFolder in $spFolder.SubFolders)
#make sure it isn't the bultin forms folder
if($spSubFolder.Name -ne "Forms")
From here you should just need to create your time line. Please note: I wrote the powershell from "the hip", I haven't had a chance to test it, but it should be correct enough for you to complete it for your needs.
Hope this helps