Tập lệnh PowerShell sau sẽ hoạt động nếu tài nguyên không có ở đó.
Copy-Item $src_dir $dst_dir$agent_folder -recurse
Nhưng nếu các tài nguyên ở đó, nó sẽ nói:
+ Copy-Item <<<< $src_dir $dst_dir$agent_folder -recurse
+ CategoryInfo : ResourceExists: (C:\Users\Pac\Desktop\Agents\Agent0\lib:S
tring) [Copy-Item], IOException
+ FullyQualifiedErrorId : DirectoryExist,Microsoft.PowerShell.Commands.CopyItemComm
and
Tôi phải thêm gì vào lệnh để nó sao chép tệp vô điều kiện?