<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Copy on Matt Thornton</title>
    <link>https://matt-thornton.net/tags/copy/</link>
    <description>Recent content in Copy on Matt Thornton</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Fri, 28 Oct 2011 12:02:20 +0000</lastBuildDate><atom:link href="https://matt-thornton.net/tags/copy/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Quick tip: SPListItem.CopyTo custom method</title>
      <link>https://matt-thornton.net/tech/sharepoint/quick-tip-splistitem-copyto-custom-method/</link>
      <pubDate>Fri, 28 Oct 2011 12:02:20 +0000</pubDate>
      
      <guid>https://matt-thornton.net/tech/sharepoint/quick-tip-splistitem-copyto-custom-method/</guid>
      
        <description>&lt;p&gt;One use for my &lt;a href=&#34;https://www.matt-thornton.net/tech/sharepoint/sharepoint-2010-document-sets-custom-ribbon-buttons-with-custom-code&#34;&gt;custom Ribbon buttons&lt;/a&gt; could be to move files (or Document Sets) from one library to another. I was trying to get the SPListItem.CopyTo method working, but for various reasons, it refused to play ball.&lt;/p&gt;
&lt;p&gt;I came across a &lt;a href=&#34;http://www.communardo.de/home/techblog/2008/01/08/sharepoint-listenelement-splistitem-in-eine-andere-liste-kopieren/&#34;&gt;handy piece of code&lt;/a&gt; that is essentially a custom method for doing the same thing. Couldn&amp;rsquo;t understand a word of the article, but got the gist of what the code was doing. It essentially creates an item in the target location, and then copies all the field info over to the new item. This works fine for Lists, and even copies attachments, but what about for document libraries, which are setup a bit differently?&lt;/p&gt;</description>
      
    </item>
    
  </channel>
</rss>