c# taking multiple lines in a texbox and separating them
<p>Hello i'm trying to write a program that takes 3 user inputs: file path, username, and computer name and then create a batch file for each computer name in the list. I have not written the create batch file part yet but I am having trouble taking the multiple computers from the computer text box and creating separate lines of code out of them.</p>

<p>So if there are 3 computer names inside the computer textbox, id like to when the user hits the button, output each computer name on a different line.  </p>

<p>if the computer name textbox contained the following computer names:                                                  M22-LIBRL74258S, M22-LIBRL74257S, and M22-LIBRL74256S</p>

<p>the output would be :</p>

<p>XCOPY "C:\Documents and Settings\Administrator\Desktop\file.exe" "\M22-LIBRL74258S\c$\Users\username\desktop"</p>

<p>XCOPY "C:\Documents and Settings\Administrator\Desktop\file.exe" "\M22-LIBRL74257S\c$\Users\username\desktop"</p>

<p>XCOPY "C:\Documents and Settings\Administrator\Desktop\file.exe" "\M22-LIBRL74256S\c$\Users\username\desktop"</p>

<p>Thanks!</p>

<pre><code>WindowsFormsApplication1
{
       public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }

    private void browsebtn_Click(object sender, EventArgs e)
    {
        {

            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            openFileDialog1.Title = "Select a File to Send";

            // Show the Dialog.
            // If the user clicked OK in the dialog and

            if (openFileDialog1.ShowDialog(this) == DialogResult.OK)
            {
                string strfilename = openFileDialog1.InitialDirectory + openFileDialog1.FileName;
                pathtxt.Text = strfilename.ToString();
            }

        }
    }

    private void Form1_Load(object sender, EventArgs e)
    {

    }

    private void createbtn_Click(object sender, EventArgs e)
    {

        string filepath = pathtxt.Text.ToString();

        string username = usertxtbox.Text.ToString();




        string computer = computerstxtbox.Text;
        string[] split = computer.Split(new char[] { '\n' });



        foreach (string l in split)
        {

            var strIP = "XCOPY \"" + pathtxt.Text + '"' + ' ' + '"' + "\\" + "\\" + l + "\\" + "c$" + "\\" + "Users" + "\\" + username + "\\" + "desktop" + '"';
            //This is to see it

            MessageBox.Show(strIP);
        }
</code></pre>
