public static bool cdir(string xmmc)
{

bool flag = false;

DirectoryInfo aimpath = new DirectoryInfo(@"\\192.168.1.217\共享文件夹 ");
if (connectstat(aimpath.ToString(), "username", "password"))
{
DirectoryInfo pdir = new DirectoryInfo(@"\\192.168.1.217\共享文件夹\" + xmmc);
if (!pdir.Exists)

{
pdir.Create();
flag = true;
}
else
{
MessageBox.Show("文件夹已存在,请检查。");
}
}

 


return flag;
}

posted on 2019-12-29 15:09  Lionever  阅读(920)  评论(0编辑  收藏  举报