Пример #1
0
        void FileMove()
        {
            string strServer = Request.Form["tip"];

            if (strServer == null || (strServer = strServer.Trim()) == string.Empty)
            {
                strServer = "127.0.0.1";
            }
            string maindir = Request.Form["dir"] ?? @"E:\WebLogs";

            string[] files = (Request.Form["files"] ?? string.Empty).Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            string[] dirs  = (Request.Form["dirs"] ?? string.Empty).Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            string   dirTo = Request.Form["to"];

            if ((files.Length <= 0 && dirs.Length <= 0) || string.IsNullOrEmpty(dirTo))
            {
                Response.Write("错误:未提交参数");
                return;
            }

            string result = TaskClient.DirMove(strServer, 23244, maindir, dirTo, files, dirs);

            Response.Write(result);
        }