Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8273179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:23:28+00:00 2026-06-08T07:23:28+00:00

I see lots of threads on copying files from one document library to another,

  • 0

I see lots of threads on copying files from one document library to another, but i want to move or copy a complete document library from one site to another (within the same site collection).

Is this possible with .NET C# code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T07:23:29+00:00Added an answer on June 8, 2026 at 7:23 am

    No, this is not possible – this is where specialized Backup solutions from third party vendors come in.

    If you are talking about a simple document library it is of course not that hard:

    • You first create a new document library at your destination and apply all your settings you have on your current library
    • Secondly you just have to iterate over all documents in the library and use use the SPFolder.Add command

      SPFileCollection collFile = collFolder.Files;
      foreach(SPFile file in collFile)
      destFolder.Files.Add(file.Name, file.OpenBinary());

    The collFolder in this case is the original document libary. The destFolder is the new document library. You can get the doc libs as a folder by using SPWeb.GetFolder(string doclibname).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I look at C++/Tk for as a GUI library. I see lots of
I see lots of apps using Form objects to validate data and then passing
I see lots of articles saying how great IoC and DI are and none
See the picture below. It's a flash game from a well known website :)
see fiddle Firstly i am new to jquery. i have to make one cell
see fiddle I want to drag the mouse on cell and whatever is under
I see several other questions about load testing web services. But as far as
I have spent the whole day trying to make my application use threads but
I'm trying to create a threadpool with the boost threadpool library, but on defining
I have a project which has lots of modules, each one has different running

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.