使用powershell将文件夹中的文件替换为其他文件夹中的文件

时间:2015-08-20 05:24:23

标签: powershell powershell-v2.0 powershell-ise

我有两个文件夹。

  1. Folder1包含许多文件。

  2. Folder2是folder1中一组文件的Service Pack。

  3. 我想通过PowerShell将Folder1中的特定文件替换为Folder2中的文件。

    -Replace是正确的起点吗?我该怎么做呢?

    更新

    Get-ChildItem $hotfix | ForEach-Object {Copy-Item $_.FullName -Destination $original -force}
    

0 个答案:

没有答案
相关问题