R
rajatsahgal
Guest
Hello,
I've a code for marge multipal txt files into a single txt file from click on start button now i want to keep this code alive till code stopped by the user.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Windows.Forms;
namespace FILEOPNER
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
String path1 = @"C:\file1.txt";
String path2 = @"C:\file2.txt";
String path3 = @"C:\file3.txt";
String newFilePath = @"C:\OUT.txt";
String text1 = String.Format("\r{0}", File.ReadAllText(path1));
text1 += "\r\n";
text1 += File.ReadAllText(path2);
text1 += "\r\n";
text1 += File.ReadAllText(path3);
File.WriteAllText(newFilePath, text1);
}
private void progressBar1_Click(object sender, EventArgs e)
{
}
}
}
Continue reading...
I've a code for marge multipal txt files into a single txt file from click on start button now i want to keep this code alive till code stopped by the user.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Windows.Forms;
namespace FILEOPNER
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
String path1 = @"C:\file1.txt";
String path2 = @"C:\file2.txt";
String path3 = @"C:\file3.txt";
String newFilePath = @"C:\OUT.txt";
String text1 = String.Format("\r{0}", File.ReadAllText(path1));
text1 += "\r\n";
text1 += File.ReadAllText(path2);
text1 += "\r\n";
text1 += File.ReadAllText(path3);
File.WriteAllText(newFilePath, text1);
}
private void progressBar1_Click(object sender, EventArgs e)
{
}
}
}
Continue reading...