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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:21:30+00:00 2026-05-13T07:21:30+00:00

I want to transfer files using ftp in a simple and effective manner. For

  • 0

I want to transfer files using ftp in a simple and effective manner. For example, if we want to send a file means we just put the entire file with commands, but if it is a huge file and the network strength is low means automatically the transferspeed will be reduced.
What will be the effective method to transfer a huge file even the network strength is low?

Below is the piece of code where i get some error,please have a look at it.i employed threading here:

public partial class Form1 : Form
{
    ArrayList AscendingList = new ArrayList();
    ListViewItem Litem = null;
    Thread MyThread = null;
    ThreadStart Starter = null;

    public Form1()
    {
        InitializeComponent();
    }

    private void btn_split_Click(object sender, EventArgs e)
    {
        foreach (ListViewItem litem in listView1.Items)
        {
            Starter = delegate { SplitFile(litem.Text,litem.SubItems[1].Text,int.Parse(litem.SubItems[2].Text)); };
            MyThread = new Thread(Starter);
            MyThread.IsBackground = true;
            MyThread.Start();
        }
    }
    public void SplitFile(string inputFile, string outputPrefix, int chunkSize)
    {
        int pointr = 0;
        byte[] buffer = new byte[chunkSize];

        using (FileStream fs = new FileStream(inputFile, FileMode.Open, FileAccess.Read, FileShare.None))
        {
            int index = 0;
            pointr = fs.Read(buffer, 0, buffer.Length);
            while (pointr != 0)
            {
                using (FileStream fso = new FileStream(outputPrefix + "\\" + index + ".log", FileMode.Create))
                {
                    AscendingList.Add(fso.Name);
                    fso.Write(buffer, 0, pointr);
                    pointr = fs.Read(buffer, 0, buffer.Length);
                }
                index++;
            }
        }
    }

    private void button1_Click(object sender, EventArgs e)
    {
        Litem = new ListViewItem();
        Litem.Text = "E:\\butterfly.mpg";
        Litem.SubItems.Add("H:\\karthik");
        Litem.SubItems.Add("102400");
        listView1.Items.Add(Litem);
    }

    private void button2_Click(object sender, EventArgs e)
    {
        Litem = new ListViewItem();
        Litem.Text = "E:\\karthik.mpeg";
        Litem.SubItems.Add("H:\\karthik\\karthik");
        Litem.SubItems.Add("102400");
        listView1.Items.Add(Litem);
    }
}
  • 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-13T07:21:30+00:00Added an answer on May 13, 2026 at 7:21 am

    I RESOLVED THE THREAD ISSUE,I PUT THE SPLITTING FUNCTIONALITY INTO A SEPARATE CLASS .I CREATE NEW INSTANCE FOR EVRY INPUT AND ASSIGN IT TO A THREAD.IT WORKS FINE NOW.

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

Sidebar

Related Questions

Suppose I want to transfer just a portion of a file over FTP -
I want to transfer files across the network using C or C++. What topics
I just want to transfer (send or receive) a hash from client to server.
I want to transfer files from one directory to another using streamreader and writer
I want to transfer XML from client to some server using FTP . What
i want transfer files using p2p connection. There will be a server or any
I want to transfer a character device file created using cygwin (running on windows
I want to transfer files between any 2 active users on my website and
I want to transfer data(21M rows) from mysql database to DynamoDB. I am using
i want to know how to transfer geopoint to address Example double src_lat =30.022584

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.