Download the files in azure using azcopy

3.6k views Asked by At

I am trying to download the files from the blod container in azure...But its showing Error: Unknowncommand

Cmd:

AzCopy https://forecast.blob.core.windows.net/test C:\Users\Shwettha\Downloads\azcopyfiles /sourceKey:sp=rl&st=2020-07-17T12:17:25Z&se=2020-12-31T21:30:00Z&sv=2019-10-10&sr=c&sig=z9b0X4vT6DGy6zOGNffM5FVaK5jNGOTeFFWD /S /V:C:\temp\logs\azcopy.log

error:
Error: unknown command "https://forecast.blob.core.windows.net/test" for "azcopy"

I also tried

    azcopy cp "https://forecast.blob.core.windows.net/test/apollo?si=Utopus&sv=2019-12-12&sr=c&sig=qHv1ojyG2hrjrq7ZQ%2BMAVZhkpCwrXs1" "utopus/apollo/forecast/dayahead" --recursive

Error: is not recognized as an internal or external command,
operable program or batch file.

Can anyone pls help me...to downlaod or list the files in the blob. iam new to azcopy

Have tried below command

azcopy cp "https://forecast.blob.core.windows.net/test/apollo?si=Utopus&sv=2019-12-12&sr=c&sig=qHv1ojyG2BMAVZhkpCwrXsD" "c:/Users/Shwettha/Downloads/azcopyfiles" --recursive

enter image description here

1

There are 1 answers

16
Ivan Glasenberg On BEST ANSWER

It seems that you're trying to copy the contents of directory to local.

Here's something you need to check:

1.the version of your azcopy

2.Open your cmd in your computer, and navigate to the location where the azcopy.exe is.

3.the sastoken you're using, please follow the screenshot below to generate the sastoken(In azure portal):

enter image description here

4.suppose you have a blob container named test8, and the container has a directory named ccc. now if you want to download all the blobs inside the directory ccc, please use the command below:

azcopy cp "https://yy1.blob.core.windows.net/test8/ccc?your_sastoken" "d:\bbb" --recursive

Here is the screenshot:

enter image description here