using System.Text;

namespace ConsoleApp2
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string fileName = args[0];
            string markFilter=args[1];
            fileName = AppDomain.CurrentDomain.BaseDirectory + fileName;
            string[] fileContents=File.ReadAllLines(fileName);
            List<string> newContext = new List<string>();
            foreach(string s in fileContents)
            {
                if (s.IndexOf(markFilter) >= 0)
                {
                    DateTime d=DateTime.Now;
                    newContext.Add($"  \"{d.Year}{d.Month.ToString().PadLeft(2,'0')}{d.Day.ToString().PadLeft(2,'0')}{d.Hour.ToString().PadLeft(2,'0')}{d.Minute.ToString().PadLeft(2,'0')}{d.Second.ToString().PadLeft(2,'0')}\"{markFilter}");
                }
                else
                    newContext.Add(s);
            }
            File.Delete(fileName);
            //foreach (string s in newContext)
            {
                File.WriteAllLines(fileName, newContext.ToArray(), Encoding.UTF8);
            }
        }
    }
}