Forrest logo
back to the azcopy tool

azcopy:tldr:ce4dc

azcopy: Upload files with `.txt` and `.jpg` extensions.
$ azcopy copy '${path\to\source_directory}' 'https://${storage_account_name}.blob.core.windows.net/${container_name}' --include-pattern '${*-txt;*-jpg}'
try on your machine

The given command is using the "azcopy copy" command-line tool, which is used to copy files and directories to and from Azure Blob Storage.

Here is the breakdown of the command:

  1. azcopy copy: This is the command for using the azcopy tool.

  2. '${path\to\source_directory}': This specifies the source directory from which files need to be copied. You need to replace ${path\to\source_directory} with the actual path to the source directory on your local machine.

  3. 'https://${storage_account_name}.blob.core.windows.net/${container_name}': This specifies the destination URL where the files will be copied. You need to replace ${storage_account_name} with the name of your Azure Blob Storage account, and ${container_name} with the name of the container within that storage account.

  4. --include-pattern '${*-txt;*-jpg}': This specifies the type of files to be included for copying. It uses a wildcard pattern to match files with a .txt or .jpg extension. For example, if you have files like file1.txt, file2.jpg, or myfile.jpg, etc., they will be included in the copy operation. This pattern can be modified as per your requirement.

Overall, this command uses azcopy to copy files from the specified source directory to the specified Azure Blob Storage container, including only files with .txt or .jpg extensions.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the azcopy tool