![]() If these values don't match, the download fails unless you override this behavior by appending -check-md5=NoCheck or -check-md5=LogOnly to the copy command. If the Content-md5 property value of a file contains a hash, AzCopy calculates an MD5 hash for downloaded data and verifies that the MD5 hash stored in the file's Content-md5 property matches the calculated hash. This section contains the following examples: You can use the azcopy copy command to download files, directories, and file shares to your local computer. Specify a date and time in ISO 8601 format (For example: ).Įxample azcopy copy 'C:\myDirectory\*' '' -include-after '' -preserve-smb-permissions=true -preserve-smb-info=trueįor detailed reference, see the azcopy copy reference docs. Use the azcopy copy command with the -include-after option. Upload files that were modified after a date and time If you want to copy all of the text files that exist in a directory tree, use the -recursive option to get the entire directory tree, and then use the -include-pattern and specify *.txt to get all of the text files. The -include-pattern and -exclude-pattern options apply only to filenames and not to the path. To learn more, see azcopy copy reference docs. You can also exclude files by using the -exclude-pattern option. Separate names by using a semicolon ( ).Įxample azcopy copy 'C:\myDirectory' '' -include-pattern 'myFile*.txt *.pdf*' -preserve-smb-permissions=true -preserve-smb-info=true Specify partial names that include the wildcard characters. Use the azcopy copy command with the -include-pattern option. ![]() ![]() You can also exclude files by using the -exclude-path option. You need to include the -recursive option to transfer all files in the C:\myDirectory\photos directory. In this example, AzCopy transfers the C:\myDirectory\photos directory and the C:\myDirectory\documents\myFile.txt file. Separate individual file names by using a semicolon ( ).Įxample azcopy copy 'C:\myDirectory' '' -include-path 'photos documents\myFile.txt' -preserve-smb-permissions=true -preserve-smb-info=true Use the azcopy copy command with the -include-path option. You can upload specific files by using complete file names, partial names with wildcard characters (*), or by using dates and times. You can upload the contents of a directory without copying the containing directory itself by using the wildcard symbol (*).Īzcopy copy '/*' ' Example azcopy copy 'C:\myDirectory\*' '' -preserve-smb-permissions=true -preserve-smb-info=trueĪppend the -recursive flag to upload files in all sub-directories. If you specify the name of a directory that doesn't exist in the file share, AzCopy creates a new directory by that name. To copy to a directory within the file share, just specify the name of that directory in your command string. The result is a directory in the file share by the same name.Įxample azcopy copy 'C:\myDirectory' '' -recursive -preserve-smb-permissions=true -preserve-smb-info=true This example copies a directory (and all of the files in that directory) to a file share. For example: 'C:\myDirectory\*.txt', or C:\my*\*.txt. You can also upload a file by using a wildcard symbol (*) anywhere in the file path or file name. ![]() ![]() Upload a fileĪzcopy copy '' ' Example azcopy copy 'C:\myDirectory\myTextFile.txt' '' -preserve-smb-permissions=true -preserve-smb-info=true That way, when the file is downloaded, AzCopy calculates an MD5 hash for downloaded data and verifies that the MD5 hash stored in the file's Content-md5 property matches the calculated hash. AzCopy doesn't automatically calculate and store the file's md5 hash code for a file greater than 256 MB.If you want AzCopy to do that, then append the -put-md5 flag to each copy command. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |