文件夹从一个驱动器移动到另一个驱动器 [英] Folder move from one drive to another

查看:67
本文介绍了文件夹从一个驱动器移动到另一个驱动器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想将一个包含文件的文件夹移动到另一个位置.

预先感谢.

解决方案

尝试以下操作:

 Process.Start(" " ); 


不需要像解决方案1那样麻烦

  var  dir =  System.IO.DirectoryInfo(path);
dir.MoveTo(NewPath); 


Hello all,

I want to move one folder having files to another location.

Thanks in advance.

解决方案

Try the following :

Process.Start("cmd.exe","/c move \"fromdirectory\" \"todirctory\" /y");


Do not need to go to so much trouble as on solution 1:

var dir = new System.IO.DirectoryInfo(path);
dir.MoveTo(NewPath);


这篇关于文件夹从一个驱动器移动到另一个驱动器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆