using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace kokocmd
{
    class Program
    {
        static void Main(string[] args)
        {
            string path = "";
            if (args.Length > 0)
            {
                path = args[0];
                if (Directory.Exists(path))
                {
                }
                else if (File.Exists(path))
                {
                    path = Path.GetDirectoryName(path);
                }
                else
                {
                    path = "";
                }
            }
            
            System.Diagnostics.Process p;
            p = new System.Diagnostics.Process();
            p.StartInfo.FileName = "cmd";
            p.StartInfo.WorkingDirectory = path;
            p.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
            p.Start();
        }
    }
}