none
Copy List Item Attachment for archiving using SharePoint Designer 2013 RRS feed

  • Question

  • hi,

    how to Copy List Item Attachment for archiving using SharePoint Designer 2013

    Thursday, September 18, 2014 6:29 AM

Answers

  • 1. You can use access:

    http://viziblr.com/news/2011/11/5/batch-exporting-sharepoint-2010-list-item-attachments-using.html

    Or you can try below script

    You can loop through each list item, and get each attachment.

    List<SPAttachment> attachments = new List<SPAttachment>();
    SPList list = SPContext.Current.Web.Lists["My List"];
    
    foreach (SPListItem item in list.Items)
    {
        attachments.AddRange(item.Attachments.Cast<SPAttachment>());
    }
    


    If this helped you resolve your issue, please mark it Answered

    Thursday, September 18, 2014 7:28 AM
  • I dont think it is possible with SP designer 

    If this helped you resolve your issue, please mark it Answered

    Friday, September 19, 2014 5:20 AM

All replies

  • 1. You can use access:

    http://viziblr.com/news/2011/11/5/batch-exporting-sharepoint-2010-list-item-attachments-using.html

    Or you can try below script

    You can loop through each list item, and get each attachment.

    List<SPAttachment> attachments = new List<SPAttachment>();
    SPList list = SPContext.Current.Web.Lists["My List"];
    
    foreach (SPListItem item in list.Items)
    {
        attachments.AddRange(item.Attachments.Cast<SPAttachment>());
    }
    


    If this helped you resolve your issue, please mark it Answered

    Thursday, September 18, 2014 7:28 AM
  • using SharePoint Designer 2013 ???
    Thursday, September 18, 2014 8:28 AM
  • I dont think it is possible with SP designer 

    If this helped you resolve your issue, please mark it Answered

    Friday, September 19, 2014 5:20 AM
  • From my knowledge if you want to archive (and then delete) SahrePoint lists items and attachments for SP on-prem or SP Online based on certain criteria your best bet will be developing a custom PowerShell or .NET app using CSOM. If you are looking for a no code solution look at the www.listman.io app that was designed specifically for that purpose.
    Friday, December 13, 2019 6:02 AM