The problem appears in the penultimate line of the code below, what can I do? Note: I've already tried using StreamReader, but it did not work.
string CJ;
string CJ1;
string CJ2;
StreamReader LJ = new StreamReader(Application.StartupPath + @"\Jo\" + cbJ.Text + ".ij");
{
CJ = LJ.ReadLine();
LJ.Close();
}
StreamReader L1 = new StreamReader(Application.StartupPath + @"\Ja\" + cbJ1.Text + ".jad");
{
CJ1 = LJ1.ReadLine();
LJ1.Close();
}
foreach (string newPath in Directory.GetFiles(CJ, "*", SearchOption.AllDirectories))
{
File.Copy(newPath, newPath.Replace(CJ, CJ1 + "/" + cbJ.Text), true);
}
StreamReader L2 = new StreamReader(Application.StartupPath + @"\Ja\" + cbJ2.Text + ".jad");
{
CJ2 = LJ2.ReadLine();
LJ2.Close();
}
foreach (string newPath in Directory.GetFiles(CJ, "*", SearchOption.AllDirectories))
{
File.Copy(newPath, newPath.Replace(CJ2 + "/" + cbJ.Text, CJ), true);
}