Not replace blob in Storage RRS feed

  • Question

  • 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

    • Moved by Bill_Stewart Friday, January 26, 2018 3:43 PM Unanswerable drive-by question
    Wednesday, December 20, 2017 6:25 PM

All replies

  • What is it you are calling an incremental copy?


    Wednesday, December 20, 2017 8:45 PM