2015-04-02 72 views

回答

0

您必須指定要複製哪些文件。例如,如果你想選擇的所有內容從G:\Folder1執行可以Get-ChildItem "$files",將它們存儲在一個變量,然後用它作爲參數

$files = Get-ChildItem "G:\Folder1" 
Copy-Item $files "h:\yourFolder" 
+0

謝謝你的回覆。我第一次使用Powershell。我已經輸入這行C:\> $ files = get-childitem「C:\ Powershell_Source」copy-item $ files c:\ Powershell_Destination。我得到這個錯誤msg-> S C:\> $ files = get-childitem「C:\ Powershell_Source」copy-item $ files c:\ Powershell_Destination – 2015-04-03 09:14:46