Omit uploaded files with AzCopy Omit uploaded files with AzCopy azure azure

Omit uploaded files with AzCopy


Use /XO flag in the command. It will not copy/replace old files. Sample command,

AzCopy /Source:C:\myfolder /Dest:https://myaccount.blob.core.windows.net/mycontainer /DestKey:key /XO


As it is documented in azcopy reference

--overwrite string Overwrite the conflicting files and blobs at the destination if this flag is set to true. Possible values include 'true', 'false', 'ifSourceNewer', and 'prompt'. (default "true")

So something like this should work:

azcopy.exe copy "source location" "destination location" --overwrite=false


If the files uploaded by another tool has different naming convention with the new ones, you could use option /Pattern to upload only the new files,

e.g. old files have naming convention like “abcxxxx”, new files have naming convention like “xyzxxx”, then please specify /Pattern:xyz* to copy the new files only.

Or use option /xo (means exclude old files) to copy new files only, note that AzCopy will compare local files' change time with the 'Last Modified Time' of the destination blobs when you specified option /xo and /xn, please make sure the uploaded old files’ ‘Last modified time’ is same or newer than the their local copies’ change time, otherwise the old files will be uploaded again when you specified option /xo. You can use option /MT to set ‘Last Modified Time’ as same as local copies’ change time during upload.

For more details, please visit http://aka.ms/azcopy

Thanks