Tell AzCopy batch to overwrite files?
Asked Answered
S

2

13

So I'm using an AzCopy which is run manually at the moment but I was to run it through Task Scheduler on one of our servers. This copies files from one container to another and runs perfectly if I manually execute the batch file. However, it asks me:

Overwrite https://.file.core.windows.net// with https://.file.core.windows.net//? (Yes/No/All)

Now this is all great and if I click Yes or All is proceeds with no problems. But if it is scheduled, I loose the ability to click Yes/All and then it hits timeout?

Is there a way or something I'm missing to allow it to continue through this please?

Thanks in advance!

Saluki answered 3/7, 2017 at 13:23 Comment(0)
B
19

Please try it with /Y option. From AzCopy Parameters:

/Y

Suppresses all AzCopy confirmation prompts.

Busk answered 3/7, 2017 at 13:29 Comment(4)
The link no longer lists all of the parameters...Is there anywhere online that lists them because I cannot find it!Ellington
@OffHeGoes - Try here: learn.microsoft.com/en-gb/previous-versions/azure/storage/…Saluki
@JoshReynolds Thanks, but that is the older version 8. I would like to see the latest :)Ellington
Works only for Windows.Falls
D
6

For version 10, the default behavior is to overwrite without prompt and this can be controlled by the --overwrite flag (default 'true').

Overwrite the conflicting files and blobs at the destination if this flag is set to true. (default 'true') Possible values include 'true', 'false', 'prompt', and 'ifSourceNewer'. For destinations that support folders, conflicting folder-level properties will be overwritten this flag is 'true' or if a positive response is provided to the prompt. (default "true")

See also the azcopy copy page for reference.

Dickie answered 29/9, 2021 at 15:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.