question

laurent-33 avatar image
0 Votes"
laurent-33 asked HerreraCelerino-0273 commented

Webjob in webapp : azcopy with /S option -> error parameter name is required

Hello,

I made a webjob running on a windows webapp, to run an azcopy command (from blob storage to an other one).

unfortunetly, azcopy V10 seems not installed so I have tried to use the one I found in AzCopy8 folder
Note : there is also a D:/devtools/AzCopy folder but i don't know what version it is (behavior is the same)

My webjob script command :

$SYSTEMDRIVE/devtools/AzCopy8/AzCopy /Source:"..............." /Dest:".................." /SourceKey:..... /DestKey:..... /S

This command works well in the cmd advanced tools of the webapp but failed using webjob :
Error parsing the argument "S:/": parameter name is required.

=> It seems webjob does not support the option without argument (it does the same if I try to add /Y not to get some prompt)


What I have already tried :

  • ................. /S:"" -> same error

  • ................. /S:"*" -> "Error: only True or False are allowed"

  • ................. /S:True or "True" -> "Error parsing the argument "S:True": parameter name is required"

  • ................. /Pattern:"." -> no error but 0 files copied (the same in cmd advanced tools wild card character fails, if i try "*.jpg" -> 0 files too)


would you have an idea ?
laurent

azure-webapps-webjobs
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

laurent-33 avatar image
1 Vote"
laurent-33 answered HerreraCelerino-0273 commented

For thoses who have same problem, I downloaded the new V10 version to workaround the V8 version problem

new webjob script :

cd $HOME/site/deployments/tools
curl.exe -L -o AzCopy.zip https://aka.ms/downloadazcopy-v10-windows
unzip -j AzCopy.zip
azcopy copy "https://........" "https:........." --recursive


Note : I used tools repository because it is in the path environment variable

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Laurent-33, Thanks for sharing the solution that worked for you with the community. These are great points, it would surely help users with a similar issue. Appreciate the follow-up. Apologies for the delay in responding here.

0 Votes 0 ·

thank you so much. i had version 8.x.x installed by default with chocolatey

0 Votes 0 ·