• Documentation
  • Reference
    Show / Hide Table of Contents
    • Introduction
    • Settings
    • Contributing
    • NuGet Package

    Getting Started

    Install AzCopy

    First, you'll need to make sure you have AzCopy installed. You can find the full documentation of how to install AzCopy for Windows here and AzCopy for Linux here.

    Since this addin relies on the underlying AzCopy CLI to perform copy operations, it runs on either Linux or Windows

    Warning

    Since AzCopy is not supported on macOS, this addin is also not supported for macOS.

    [!INFO] For this addin to work, you need to make sure one of AzCopy.exe or azcopy is available in the PATH or the tools/ folder.

    Including the addin

    At the top of your script, just add the following to install the addin:

    #addin nuget:?package=Cake.AzCopy
    

    Usage

    The addin exposes a single (overloaded) method alias AzCopy to use when for copy operations.

    To use the defaults, just run the AzCopy(string, string) alias:

    AzCopy("https://myaccount.blob.core.windows.net/mycontainer/", "~/temp/");
    

    To use the fluent settings API, just run the AzCopy(string, string, Action<AzCopySettings>) alias:

    AzCopy("https://myaccount.blob.core.windows.net/mycontainer/", "~/temp/", settings => settings.UsePattern("*.txt"));
    

    To use the object settings API, just run the AzCopy(string, string, AzCopySettings) alias:

    var settings = new AzCopySettings { Pattern = "*.txt" };
    AzCopy("https://myaccount.blob.core.windows.net/mycontainer/", "~/temp/", settings);
    

    The addin will take care of adapting the commands and options to the platform your build is running on.

    Settings

    Full information on the various settings available is provided in the Settings documentation.

    • Improve this Doc
    Back to top This addin is © 2017 Alistair Chapman, and released under the terms of the MIT License