我有以下脚本,它将所有文件从c:\images复制到mybucket\myfolder
我该如何做相反的事情并从mybucket\myfolder复制到c:\images?
$key = "mykey"
$secret = "mysecret"
$cbsnap = "CloudBerryLab.Explorer.PSSnapIn"
if ( (Get-PSSnapin -Name $cbsnap -ErrorAction SilentlyContinue) -eq $null )
{
Add-PsSnapin $cbsnap
}
Set-CloudOption -PermissionsInheritance "inheritall"
$s3 = Get-CloudS3Connection -Key $key -Secret $secret
Set-Logging –LogPath c:\temp\sync.log -LogLevel info
$bucket = "mybucket\myfolder"
$local = "c:\images\"
#copy from local to S3
$s3selflhost = $s3 | Select-CloudFolder -path $bucket
$src = Get-CloudFilesystemConnection | Select-CloudFolder -path $local
$src | Copy-CloudItem $s3selflhost -filter "*"