I want to include batch file into a main file.
//contents of copy.bat
copy *.txt Output.txt
Is there any direct solution using c#. Following code generates no error at the cost of no output.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
System.Diagnostics.Process.Start(@"C:\mydir\copy.bat");
}
}
}