none
Sharepoint 2010 - Archiving the files from one document library to another document library in sharepoint site

    Question

  • I have a requirement to move the documents from one document library to another document library.
    Source Library - DocumentLib
    Destination Library - Archive
    Archive document library will have folders by fiscal year.
    Source documentlibrary has files from year 2012 till date.
    Archive folder will have folders by fiscal year -(fiscal year starts from July1st -June 30th )
    If the document is created date  between 1st  July 2012 -June 2013 then move the document to Archive document library and in  folder Fiscal Year 2013.
    If the document is created date  between 1st  July 2013 -June 2014 then move the document to Archive document library and in  folder Fiscal Year 2014.

    The structure of destination document library folder should be same as source document library.

    Please find attached the screenshot of the requirement.

    Files Type - Excel,pdf,microsoft outlook item

    Could we use Sharepoint designer workflow to achive this task?
    Any help on this will be appreaciated.




    • Edited by asritha Tuesday, September 17, 2013 1:55 PM
    Monday, September 16, 2013 7:31 PM

Answers

  • Hi Asritha,

    We can set Content Organizer Rules to move documents to a folder in another library.
    However, the Source Library should be the Drop Off Library.
    Here is the detailed steps to meet the need:
        1. Activate the feature Content Organizer in Manage site features in site settings.
        2. Add a date type column in Site columns in site settings, and add this column to the content type used to create documents in the Drop Off Library.
        3. Click Content Organizer Rules in site settings, and click Add new item.
        4. Select the content type that used to create documents in Drop Off Library in Submission's Content Type.
        5. Select the date type field created in step 2 in Property drop-down menu in Conditions, then choose is greater than in Operator drop-down menu, choose 7/1/2012 in the Value.
        6. Click Add another condition.
        7. Select the date type field created in step 2 in Property drop-down menu in Conditions, then choose is less than in Operator drop-down menu, choose 6/30/2013 in the Value.
        8. Choose the folder Fiscal Year 2013 in the Destination, then click OK.
    After that we can set another rule to move the corresponding documents to the folder Fiscal Year 2014.

    Best regards.
    Thanks

    Wednesday, September 18, 2013 9:52 AM
    Moderator
  • Hi Asritha,

    According to your description, you want to create a workflow to meet the need.

    Per my knowledge, there is no built-in action which can move the documents from the current library to a folder in another library.

    I recommend to use the custom activity 'Copy List Item Extended' which need to be downloaded from http://spdactivities.codeplex.com/.

    Please per the steps below to deploy the custom activity to SharePoint:

    1. Download the activity form http://spdactivities.codeplex.com/
    2. Open Dos command prompt.
    3. Browse to the directory that you can access stsadm.exe. The default location in version 3.0 is C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\bin
    4. Type the stsadm commands: stsadm -o addsolution -filename C:\UsefulSPDWorkflowActivities_0.5.0\DP.Sharepoint.Workflow.wsp (“C:\UsefulSPDWorkflowActivities_0.5.0\” is the file path)
    5. Type the stsadm commands: stsadm -o deploysolution -name DP.Sharepoint.Workflow.wsp -allowgacdeployment -force -immediate 
    6. Open the Center Administration, Click System Setting->Manage Farm Solution-> dp.sharepoint.workflow.wsp->Deploy to the Web Application.

    After that, we can create a workflow to meet the need.

    Here is the detailed steps to create the workflow:

    1. Create a workflow associated with the Source Library DocumentLib and set the workflow to start when an item is created.
    2. Select If current item field equals value, change the settings to be If Current Item: Created is greater than 7/1/2012.
    3. Select If current item field equals value, change the settings to be If Current Item: Created is less than 6/30/2013.
    4. Select Copy List Item Extended, change the settings to be Copy item in Current Item to list at Fiscal Year 2013 folder url.
    5. Select Delete Item, change the settings to be Delete Item in Current Item.
    6. Select If current item field equals value, change the settings to be If Current Item: Created is greater than 7/1/2013.
    7. Select If current item field equals value, change the settings to be If Current Item: Created is less than 6/30/2014.
    8. Select Copy List Item Extended, change the settings to be Copy item in Current Item to list at Fiscal Year 2014 folder url.
    9. Select Delete Item, change the settings to be Delete Item in Current Item.
    10. Publish the workflow.

    Best regards.

    Thanks
    Tuesday, September 17, 2013 11:35 AM
    Moderator

All replies

  • If you are using SP 2010 you might have to consider using content organizer feature which will do the job for you . 

    Activate content organizer feature

    create Routing Rule for the drop off library.

    and all set


    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

    Monday, September 16, 2013 8:52 PM
  • Hi Jayaraja,

    Thank you for quick response.

    Will this work for any file type? Destination document library contains files of type Excel,Pdf,Microsoft outlook item,microsoft outlook template,word,image(tiff) ,text files.

    Could you please provide any links that help me content organizer feature ? Where can I see content organizer feature . I am unable to see in site collection features.



    • Edited by asritha Monday, September 16, 2013 9:10 PM
    Monday, September 16, 2013 9:03 PM
  • Hi Asritha,

    According to your description, you want to create a workflow to meet the need.

    Per my knowledge, there is no built-in action which can move the documents from the current library to a folder in another library.

    I recommend to use the custom activity 'Copy List Item Extended' which need to be downloaded from http://spdactivities.codeplex.com/.

    Please per the steps below to deploy the custom activity to SharePoint:

    1. Download the activity form http://spdactivities.codeplex.com/
    2. Open Dos command prompt.
    3. Browse to the directory that you can access stsadm.exe. The default location in version 3.0 is C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\bin
    4. Type the stsadm commands: stsadm -o addsolution -filename C:\UsefulSPDWorkflowActivities_0.5.0\DP.Sharepoint.Workflow.wsp (“C:\UsefulSPDWorkflowActivities_0.5.0\” is the file path)
    5. Type the stsadm commands: stsadm -o deploysolution -name DP.Sharepoint.Workflow.wsp -allowgacdeployment -force -immediate 
    6. Open the Center Administration, Click System Setting->Manage Farm Solution-> dp.sharepoint.workflow.wsp->Deploy to the Web Application.

    After that, we can create a workflow to meet the need.

    Here is the detailed steps to create the workflow:

    1. Create a workflow associated with the Source Library DocumentLib and set the workflow to start when an item is created.
    2. Select If current item field equals value, change the settings to be If Current Item: Created is greater than 7/1/2012.
    3. Select If current item field equals value, change the settings to be If Current Item: Created is less than 6/30/2013.
    4. Select Copy List Item Extended, change the settings to be Copy item in Current Item to list at Fiscal Year 2013 folder url.
    5. Select Delete Item, change the settings to be Delete Item in Current Item.
    6. Select If current item field equals value, change the settings to be If Current Item: Created is greater than 7/1/2013.
    7. Select If current item field equals value, change the settings to be If Current Item: Created is less than 6/30/2014.
    8. Select Copy List Item Extended, change the settings to be Copy item in Current Item to list at Fiscal Year 2014 folder url.
    9. Select Delete Item, change the settings to be Delete Item in Current Item.
    10. Publish the workflow.

    Best regards.

    Thanks
    Tuesday, September 17, 2013 11:35 AM
    Moderator
  • Thank you for your response. I do not have access to Central Administartion and I do not have permissions to  install on server. Is there any work around? I have read something about Content Organizer. Will this concept help me in achieving the task?
    Tuesday, September 17, 2013 5:41 PM
  • Hi Asritha,

    We can set Content Organizer Rules to move documents to a folder in another library.
    However, the Source Library should be the Drop Off Library.
    Here is the detailed steps to meet the need:
        1. Activate the feature Content Organizer in Manage site features in site settings.
        2. Add a date type column in Site columns in site settings, and add this column to the content type used to create documents in the Drop Off Library.
        3. Click Content Organizer Rules in site settings, and click Add new item.
        4. Select the content type that used to create documents in Drop Off Library in Submission's Content Type.
        5. Select the date type field created in step 2 in Property drop-down menu in Conditions, then choose is greater than in Operator drop-down menu, choose 7/1/2012 in the Value.
        6. Click Add another condition.
        7. Select the date type field created in step 2 in Property drop-down menu in Conditions, then choose is less than in Operator drop-down menu, choose 6/30/2013 in the Value.
        8. Choose the folder Fiscal Year 2013 in the Destination, then click OK.
    After that we can set another rule to move the corresponding documents to the folder Fiscal Year 2014.

    Best regards.
    Thanks

    Wednesday, September 18, 2013 9:52 AM
    Moderator
  • Thank you so much for response.I have question. Will the custom activity Copy List Item Extended Activity from this site (http://spdactivities.codeplex.com/) that you have suggested work for sharepoint2010 ? 

    If we want to use Content Oraganizer concept, then for already created files how to add the content type (Date) information?

    I am moving files to Drop off library from another source library using workflow. These files are old and does not contain content type information.I have tried adding the content type information to already uploaded file using Datasheet view. But those files that are updated with content type information are not being moved to destination folder in doc library. But the new files that I have uploaded directly to Drop off library with content type information re moved to Destination Document library folder. Could suggest me any ideas to overcome this issue. Am I missing something?

    • Edited by asritha Wednesday, September 18, 2013 3:32 PM
    Wednesday, September 18, 2013 2:01 PM
  • Hi Asritha,

    The custom activity Copy List Item Extended Activity can be used in SharePoint 2010.

    Do you use the same content type in the old files?

    If yes, please follow the steps below:

        1. Go to the library settings of the library where the old files stored, click  Advanced settings under General Settings, select Yes under Allow management of content types and click OK.

        2. Click the content type under Content Types, click Add from existing site or list columns under Columns, select the Date column.

    Best reagrds.

    Thanks

    Thursday, September 19, 2013 10:29 AM
    Moderator
  • Hi Thank you for your reply. I did follow your steps . But challenge here is there are about 4000 files for which content type information has to be set. Unless we set the content type the file and push it to Drop off library ,the file is not going to route.open the file from Drop off library and select the content type and click on submit. only then the routing process starts for file in drop off library.

     Set the content type(Test created date ) of old file with Created date in work flow in Source library.I have moved the files from Source library to Drop of library using workflow. Set the content oragnaiser rules to route the document. But the document stays in drop off library and does not get routed to destination library folder.

    Steps I have done so far.

    1.Updated the content type (Test created date) with created date column using a workflow .Since Content organiser works on content type and old files in source library are not associated with content type information.

    2.Used workflow to move files from Source library to Drop off library

    3.Files from Drop off are not being routed to destination library Archive -Folder Fisacl Year 2013. Though I have configured rules in content Organizer.

    4.If I would directly upload files to Drop off library and fill the content type information the files are routed to respective destionation library folders.

    5.If I would open the files that are moved to drop off library from source library using workflow, and fill the content type information and click on submit button then the file gets routed to respective destionation library folder. Could you please advise me what I should be doing to achive the task.

    I appreciate you for taking time in answering the queries.

    Find attached scrren shot of the task.

    Thursday, September 19, 2013 6:18 PM
  • Hi Asritha,

    Thanks for your reply.

    There is a Timer Job that check the documents in the Drop Off library, if the documents match the rule, the documents will be routed to the target location.

    I recommend to run the Timer Job Content Organizer Processing which associated with the corresponding web application.

    Please go to Central Administration >  Monitoring > Content Organizer Processing.

    Best regards.

    Thanks

    Friday, September 20, 2013 9:53 AM
    Moderator
  • Thank you so much for all your help.Timer Job Content Organizer id configured to run every 30 min.Files from Drop off library moves to destination library Archive Fisacl Year folders. Truly appreciate your help. I have a question source library has look up ,calculated column,choice columns. So when we move files to drop off library from Source document how do  we set the look up, calculated column,choice columns information?
    Friday, September 20, 2013 1:26 PM
  • Hi Asritha,

    The columns in the content type can be edited in Drop Off library, and the other columns added in the original library which is not added in the content type cannot be edited in the Drop Off library.

    I recommend to set the lookup, calculated column, choice columns' information in the original library.

    Best regards.

    Thanks

    Monday, September 23, 2013 1:56 AM
    Moderator
  • Destination and source libraries should have same schema. So when we move files to destionation ,does the column (look up,choice,calculated) information from source library  also gets copied automatically to destination library folder?

    Monday, September 23, 2013 4:45 PM
  • Hi Asritha,

    The values of the columns(llokup, choice, calculated) will not be copied to destination library.

    If you want the values of the columns still be used in the destination library, I recommend to create these columns as site columns and add them to the content type.

    Best regards.

    Thanks

    Tuesday, September 24, 2013 12:53 AM
    Moderator
  • Hi Victoria,

    I have a question. I have moved the document from source library to drop off library and updated the Created Date Content Type with Created using workflow. What I have noticed is that there are couple column information assoicated to each file and those values are not being copied when i do moveing with workflow from designer. Could you please guide me ?If  Content Type values are explicitly supplied to document while uploading, only then document gets routed. If these columns are created as site columns and added to content type then we must supply these values while uploading the files or when moved to drop off library



    • Edited by asritha Monday, October 07, 2013 4:52 PM
    Monday, October 07, 2013 4:39 PM
  • Hi Asritha,

    If the columns are added into the content type, I recommend to supply these values while uploading the files.

    Best regards.

    Thanks

    Tuesday, October 08, 2013 1:56 AM
    Moderator
  • Hi Victoria, there are about 4500 files for which i need to supply these values and these files are already uploaded to source document library and I am moving these source document library files to drop off library using workflow. So how input the information to 4500 files? Truly appreciate your help.
    Tuesday, October 08, 2013 3:41 PM
  • Hi Asritha,

    I think the only OOB way is to set the values one by one manually.

    If the values are same, you can try to set the values programmatically.

    Best regards.

    Thanks

    Wednesday, October 09, 2013 1:05 AM
    Moderator
  • What if I want to archive the documents from one library (Site Collection A) to another library (Site Collection B) with same folders and files. If folder is not in create it. ??? is it possible? 

    Thanks Vivek SharePoint Foundation 2010 Book
    http://www.redpipit.com

    Tuesday, October 21, 2014 12:20 PM