解决方案 »

  1.   

    那你就把这个程序复制3份(3个Console工程),然后各取所需呗。难道说你不会删代码?
      

  2.   

    一个project只应有一个主输出(exe或者dll或其他),一个solution可以包含多个project。
    你只需要建立3个project,把输出文件夹调整到同一目录即可。
      

  3.   

    void Main(string[] args)
    {
        switch args[0]
        {
            case "-a":
                功能1的代码;
                break;
            case "-b":
                功能2的代码;
                break;
            case "-c":
                功能3的代码;
                break;        
        }
    }
      

  4.   

    +1用“\DirFileTreeInfo.exe -d ” “\CopyFile.exe ” “\PickFile.exe -d ”进行条件判断
      

  5.   

    +1用“\DirFileTreeInfo.exe -d ” “\CopyFile.exe ” “\PickFile.exe -d ”进行条件判断
    用“\DirFileTreeInfo.exe -d ” “\CopyFile.exe ” “\PickFile.exe -d ”进行条件判断就是把"a","b","c",换成前面的那些名称吗??还有就是那个我怎么把输入的两个路径(比如在移动中:一个是要初始位置文件夹的路径,另外一个是目的文件夹的路径)在对应的代码中使用呢?   
    本人是新手,如问题描述得不具体详细,请多多包涵。谢谢各位大神为我解答啦。
      

  6.   

    因为是三个应用程序,所以你就需要写三个控制台程序分别实现,下面是DirFileTreeInfo.exe的代码,用的时候直接调用cmd就可以了“..\..\DirFileTreeInfo.exe -d D:\games -o D:\gamesinfo.txt”,其中..\..\DirFileTreeInfo.exe要用绝对路径;对于CopyFile.exe和PickFile.exe,你自己参考着写写吧。
    另外,就http://bbs.csdn.net/topics/390844819这个帖子而言,是因为你在使用args时没有传递参数造成的,所以在用cmd时,要正确传递参数static void Main(string[] args)
            {
                if (args.Count() == 4)
                {
                    string param1 = args[0];
                    string path1 = args[1];
                    string param2 = args[2];
                    string path2 = args[3];
                    if (param1 == "-d" && param2 == "-o")
                    {
                        string[] dics = Directory.GetDirectories(path1);
                        string[] files = Directory.GetFiles(path1);
                        using (StreamWriter sw = new StreamWriter(path2))
                        {
                            foreach (string d in dics)
                            {
                                sw.WriteLine(d);
                            }
                            foreach (string f in files)
                            {
                                sw.WriteLine(f);
                            }
                            sw.Close();
                        }
                    }
                }
            }