alex.s alex.s - 1 month ago 5x Question how to pass the following to cmd

Can someone help me please to write it correctly in

.bat file looks like this:

CD "C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy"

AzCopy /Source: /Dest:C:Users\user\Downloads\ /SourceKey:key

I can use Process.Run and just run the bat file but I need more flexibility with user names, paths and access keys that are in the string.


You can pass arguments to process calls, yours would look something like this:

Dim p As New System.Diagnostics.Process
p.StartInfo.FileName = "C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy"
p.StartInfo.Arguments = "/Source: /Dest:C:Users\user\Downloads\ /SourceKey:key"

Just build the arguments string with whatever parameters you need to pass to the file