目的地的复制项目问题 [英] Copy-Item problem with destination

查看:65
本文介绍了目的地的复制项目问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个复制项命令


  1. 复制项 C:\Test \folder1 \\remote_machine\destination-递归

复制项目 C:\Test\folder2 \\remote_machine\destination-递归

文件夹1和文件夹2包含文件夹和文件

folder1 and folder2 contain folders and files

这两个命令相似,但结果不同

Both commands are similar, but I get different results


  1. 将folder1的内容复制到目标位置-确定

  2. 将所有内容的folder2复制到目标位置-\remote_machine\destination\folder2-失败

更新:我没有收到任何错误。问题是有关第二个文件夹的路径。我要将两个文件夹的内容都放在一个目标文件夹中。

UPDATE: I don't get any error. Problem is about path to second folder. I want content of both folders in one destination folder.

推荐答案

PowerShell有问题- http://groups.google.com/group/microsoft.public.windows.powershell/browse_frm/线程/ ae9b8b4424c2af22

It's problem with PowerShell - http://groups.google.com/group/microsoft.public.windows.powershell/browse_frm/thread/ae9b8b4424c2af22

我的示例解决方案是


  1. 复制项目 C:\Test\folder1 \\remote_machine\destination-递归

  2. Copy-Item C:\Test\folder2\ * \\remote_machine\destination-递归

  1. Copy-Item "C:\Test\folder1" "\\remote_machine\destination" -Recurse
  2. Copy-Item "C:\Test\folder2\*" "\\remote_machine\destination" -Recurse

这篇关于目的地的复制项目问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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