0
votes

I am trying to execute AzCopy command from SSIS. For that I am using Execute Process Task. In the Executable I am passing CMD path.

And Arguments are as below:

azcopy copy "https://xxxxxxxxxx.blob.core.windows.net/customers" "https://xxxxxxxxxx.blob.core.windows.net/archive" --recursive

Error:

Error: 0xC0029151 at Execute Process Task, Execute Process Task: In Executing "C:\Windows\System32\cmd.exe" "azcopy copy "https://xxxxxxxxxx.blob.core.windows.net/customers" "https://xxxxxxxxxx.blob.core.windows.net/archive" --recursive" at "", The process exit code was "1" while the expected was "0". Task failed: Execute Process Task

I have already tested it from CMD and it's working fine.

2
Does this happen while running in Visual Studio or when deployed running via an agent job? - Tim Mylott
It is happening in Visual studio. - Jay Desai
In the arguments of the Execute Proess Task add "/K" without quotes to the front and set WindowStyle=Normal. So the arguments would be: /K azcopy copy "..." "..." . The /K tells CMD to carry out the command but keep the cmd window open. That should give you some direction on why it's not running. Then once you have it working I'd change /K to /C. - Tim Mylott

2 Answers

1
votes

Error:

Your executable should point to AzCopy.exe and argument should start with copy "c:\Folder\textFile.txt" "https://xxxxxxxxxx.blob.core.windows.net/archive"

0
votes

I had similar issue and it was down to a white space character in one of the arguments. I've set the properties differently though, the executable property is set to azcopy.exe and my arguments property was set to: cp "<source path>" "<destinationURLwithappendedSAStoken>"