Updated:
please set your sastoken in Environment Variable, like it's name is bloburl_sastoken
, and use double quotes to wrap it's value(it's value looks like this: https://blobtestutopus.blob.core.windows.net/?sv=2019-10-10&ss=bfqt&srt=sco&sp=rwdlacupx&se=2020-07-17T10:09:48Z&st=2020-07-17T02:09:48Z&spr=https&sig=xxxxxxxxx
).
Then in the command prompt, use the code below:
set temp_chars=""
set temp_url=%temp_chars%%bloburl_sastoken%
set url_sastoken=%temp_url:""=%
azcopy cp "https://s3.amazonaws.com/testblobutopud/" %url_sastoken%
Original answer:
You can store the sasToken in the Environment variable. The steps are as below:
Step 1: Set an Environment Variable, you can use command or UI to do this. Here, I just set it via UI. Note that for it's value, you should wrap the value in double quotes in English mode. The screenshot as below:
Step 2: then open a cmd prompt, and use the code below(please remove the comments section):
//set a variable for the blob url
set url="https://yy1.blob.core.windows.net/test5/myfoo1.txt"
//set a variable which contains blob url and sastoken
set temp_url=%url%%mysastoken%
//remove the redundant double quotes in blob url and sastoken
set url_sastoken=%temp_url:""=%
//copy it
azcopy copy "d:\foo.txt" %url_sastoken%
Another way is that you can use AzCopy login command, then you don't need to use sastoken here.