The docs don't show an example of az storage file download but they do show an example of az storage file download-batch which is this:
az storage file download-batch --account-key 00000000 --account-name MyAccount --destination . --no-progress --source /path/to/file
Note the source path starts with a /
When I run the az storage file download command from my windows machine via powershell, and use a similar format path to the file I want to download, I get back an error:
az storage file download --path /some/path/readme.txt -s mystorage--account-key [account-key]
The specifed resource name contains invalid characters. ErrorCode: InvalidResourceName
InvalidResourceNameThe specifed resource name contains invalid characters.
RequestId:02608e12-e01a-002d-24b3-ab66cb000000
Time:2021-09-17T10:59:29.9470471Z
However if I remove the leading slash from the path it works.
So with download-batch the example shows using a leading slash, but if you use that same format for file download it errors. Perhaps an example should be added for downloading a single file to clarify, and perhaps the cli file download command could be made more robust to cope with a leading slash..
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The docs don't show an example of
az storage file downloadbut they do show an example ofaz storage file download-batchwhich is this:Note the source path starts with a
/When I run the
az storage file downloadcommand from my windows machine via powershell, and use a similar format path to the file I want to download, I get back an error:InvalidResourceNameThe specifed resource name contains invalid characters.RequestId:02608e12-e01a-002d-24b3-ab66cb000000
Time:2021-09-17T10:59:29.9470471Z
However if I remove the leading slash from the path it works.
So with
download-batchthe example shows using a leading slash, but if you use that same format forfile downloadit errors. Perhaps an example should be added for downloading a single file to clarify, and perhaps the clifile downloadcommand could be made more robust to cope with a leading slash..Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.