使用 Powershell 我想强制复制文件夹/文件而不擦除现有目标文件夹中的额外文件: [英] Using Powershell I want to Forcefully Copy Folder/files Without Erasing Extra Files in Existing Destination Folder:
本文介绍了使用 Powershell 我想强制复制文件夹/文件而不擦除现有目标文件夹中的额外文件:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 Powershell 并试图强行复制文件夹/文件而不删除现有目标文件夹中的任何额外文件.我在尝试获取工作命令时遇到困难.
I am using Powershell and am trying to forcefully copy folder/files without erasing any extra files in existing destination folders. I am stuck trying to get a working command.
下面是我的代码,关于如何解决这个问题有什么建议吗?
Below is my code, any suggestions on how to fix this?
Copy-Item -Force -Recurse –Verbose $releaseDirectory -Destination $sitePath
推荐答案
你需要确定
$realeseDirectory
有点像
c:\releasedirectory\*
Copy-item
永远不会删除目标中多余的文件或文件夹,但使用 -force
它会在文件已经存在时写入
Copy-item
never delete extra files or folders in destination, but with -force
it will owerwrite if file already exists
这篇关于使用 Powershell 我想强制复制文件夹/文件而不擦除现有目标文件夹中的额外文件:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文