I am trying to upload a file to Azure cloud by passing the command in python which will then execute it inside terminal.
Standard syntax is
azcopy cp "path\to\file\filename.txt" "https://[azure_blob_url]"
The code I am using is,
p1 = subprocess.run(
'azcopy cp "Desktop/pywatchdog/{}"'.format(
os.path.basename(event.src_path) + " " + '"https://[azure_blob_url]"'
),
shell=True,
)
I have tried few methods but I just cannot get the command to syntactically correct with correct concat.
Any ideas please?