kokocmd

使い方は単純明快で、ファイルをドラッグ&ドロップすると、そのファイルのあるディレクトリに移動した状態でコマンドプロンプトを開きます。
ディレクトリをドラッグ&ドロップすると、そのディレクトリに移動した状態でコマンドプロンプトを開きます。
いちいちコマンドプロンプトを開いてからcdするのは面倒なので作りました。
SendToフォルダにショートカットを入れておいたりすると便利に使えます。
動作には.NET Framework 2.0以上が必要です。最近のパソコンなら大体入っているでしょう。

ダウンロード

ソースっぽい何か。
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();


        }
    }
}


Top