Compare Two data table record and import into another data table Performance issue facing

I have one CSV File and it has 100000 records. Read all records and compare according the branch and split csv according the branch wise.
It is working perfact but it is take more time ( Approx 1 hour for split the file when compare the file it is compare one by one row, How i can improve the performance).
I want to compare two data table record according to column name(Branch Code).
1. copyDataTable (In this Datatable i am put the Branch Name)
2.dtexcel (In this Datatable put the records according the branch)
3. dt3 (This datatable is clone of dtexcel datatable, means only take the structure of data table)
4. strSelectedMainColName (Here are are compare the Branch Name if Branch match then it will import the all data according to branch in datatable dt3). Like this
dt3.ImportRow(row1);

5. After importing i am just calling the CreateCSVFile Method so file will split according the branch and save on my folder.



i use this code

/*Start Code For Read Data*/
foreach (DataRow row2 in copyDataTable.Rows)
{
foreach (DataRow row1 in dtexcel.Rows)
{
if (row2[strSelectedMainColName].ToString() == row1[strSelectedMainColName].ToString())
{
dt3.ImportRow(row1);
}
}

CreateCSVFile(dt3, row2[strSelectedMainColName].ToString(), i, fileName);
dt3.Clear();
i++;
int percentageProcess = currFileIndex * 100 / countTotalFiles;
backgroundWorker2.ReportProgress(percentageProcess);
progressBar1.Value = percentageProcess;
currFileIndex++;
}

public System.Data.DataTable CreateCSVFile(DataTable dtTable, string BranchName, int count, string fileName)
{
if (dtTable.Rows.Count > 0)
{
try
{
string dbf_Path = System.IO.Path.GetFileNameWithoutExtension(fileName);
YesterdayDate = DateTime.Today.AddDays(-1).ToString("dd-MM-yyyy");
currentdate = DateTime.Today.ToString("dd-MM-yyyy");
theDate = dateTimePicker1.Value.ToString("dd-MM-yyyy");
MainFile = BranchName + "_" + FtpOptionType + "_" + theDate + "." + SourceFileType;
StreamWriter sw = new StreamWriter(path + "/" + "Branch" + "/" + MainFile);
int iColCount = dtTable.Columns.Count;
for (int i = 0; i < iColCount; i++)
{
sw.Write(dtTable.Columns[i]);
if (i < iColCount - 1)
{
sw.Write(",");
}
}
sw.Write(sw.NewLine);
foreach (DataRow dr in dtTable.Rows)
{
for (int i = 0; i < iColCount; i++)
{
if (!Convert.IsDBNull(dr[i]))
{
sw.Write(dr[i].ToString());
}
if (i < iColCount - 1)

{
sw.Write(",");
}
}
sw.Write(sw.NewLine);
}
sw.Close();
}
catch (Exception ex)
{
throw ex;
}
}
return dtTable;
}