Hello,
The script upload multiples files to storage account, but i need a incremental copy.
How I set "NO" for the replace option?
I trying -Confirm:$false
but not work
$filepath = 'C:\files'
$StorageAccountName = "storage"
$StorageAccountKey = "Key"
$ctx = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey
$ContainerName = "container"
$localFileDirectory = "$filepath\"
$files = Get-ChildItem $filepath -force| Where-Object {$_.mode -match "-a---"}
foreach ($file in $files){
$fqName = $file.FullName
if ($file.Extension -ne ".publishsettings") {
Set-AzureStorageBlobContent -Blob $file.Name -Container $ContainerName -File $fqName -Context $ctx -Confirm -Recurse
}
}