c#将文件复制到某个文件夹内winform文件复制

try
{
//系统盘
string nl = Environment.NewLine;
string query = "%SystemRoot%";
string str = Environment.ExpandEnvironmentVariables(query);
string str32Path = str + @"\System32\crypto.dll"; var filePath64 = @"key/32dll/crypto.dll"; //验证系统盘system32与是否有dll,有则跳过,无则复制 if (!File.Exists(str32Path))
{
File.Copy(filePath32, str32Path);
} return true;
}
catch (Exception ex)
{
MessageBox.Show("导入dll到系统盘失败,错误原因为:"+ex.Message);
return false;
}
上一篇:基于MATLAB的中值滤波算法实现


下一篇:VS2010/MFC设置对话框控件的Tab顺序