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 582931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:44:20+00:00 2026-05-13T14:44:20+00:00

I want to upload to a Selected Document (from my system.I am having it’s

  • 0

I want to upload to a Selected Document (from my system.I am having it’s path with me).
To a destination path on Sharepoint ( may be list or folder ).

I am accessing sharepoint remotely using web services (C#).
I read various solutions like by using CopyIntoItems method.
But not getting proper example for it ( unable to pass parameters properly.tried example given on msdn)

Can anyone help me out to get simple and understandable solution.

Example:

Source_FileUrl = “c:/SampleFile.txt”;
Desination_Url = “http://MyServer/Site/List/Folder“;

Just want to upload “SampleFile.txt” on Destination_Url.

  • 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-05-13T14:44:21+00:00Added an answer on May 13, 2026 at 2:44 pm

    try this one

    try
        {
    
        //Copy WebService Settings 
        string webUrl           = "http://sharepointportal.ABC.com/";
        WSCopy.Copy copyService = new WSCopy.Copy();
        copyService.Url         = webUrl + "/_vti_bin/copy.asmx";
        copyService.Credentials = new NetworkCredential("username", "****", "Domain");
    
        //Declare and initiates the Copy WebService members for uploading 
    
        string sourceUrl        = "C:\\Work\\Ticket.Doc";   
    
        //Change file name if not exist then create new one     
        string[] destinationUrl    = { "http://sharepointportal.ABC.com/personal/username/Document Upload/Testing Document/newUpload.Doc" };
    
        WSCopy.CopyResult cResult1 = new WSCopy.CopyResult();
    
        WSCopy.CopyResult cResult2 = new WSCopy.CopyResult();
    
        WSCopy.CopyResult[] cResultArray = { cResult1, cResult2 };
    
        WSCopy.FieldInformation fFiledInfo = new WSCopy.FieldInformation();
    
        fFiledInfo.DisplayName = "Description";
    
        fFiledInfo.Type        = WSCopy.FieldType.Text;
    
        fFiledInfo.Value       = "Ticket";
    
        WSCopy.FieldInformation[] fFiledInfoArray = { fFiledInfo }; 
    
        FileStream strm = new FileStream(sourceUrl, FileMode.Open, FileAccess.Read); 
    
        byte[] fileContents = new Byte[strm.Length]; 
    
        byte[] r = new Byte[strm.Length];
    
        int ia = strm.Read(fileContents, 0, Convert.ToInt32(strm.Length));
        strm.Close();
        //Copy the document from Local to SharePoint 
    
        uint copyresult = copyService.CopyIntoItems(sourceUrl, destinationUrl, fFiledInfoArray, fileContents, out cResultArray); 
    
        MessageBox.Show("Suceess");  
    
      }
     catch (Exception ex)    
     { 
        MessageBox.Show(ex.Message);
    
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to upload a list of users from my work's LDAP server to
I want to upload upload up to 100 MB to 1GB file onto sharepoint
I want to upload picture from my_form in jQuery, I tried submit() function it
I want use from multiple upload image in codeigniter but problem is here that
I want to upload a file in a physical path such as E:\Project\Folders .
I want to upload and then process a file in a Ruby on Rails
i want to upload the sound file (.ogg) in server. But it should write
I want to upload and store video files to my server using PHP. Could
I want to upload files directly to IIS7 (in this case I am using
I want to upload a file to a ftp server programmatically (C++). If the

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.