I want to execute a batch file (Through Task Scheduler) that runs azcopy and copies only the new files to the server. I've succeeded in configuring the task scheduler, but I'm failing to properly execute the batch file.
I've done extensive research through SO and sibling sites and haven't found the solution.
Here's the batch file:
azcopy cp "E:\SISTEMA\KORRENET\CSV\*.CSV" "https://x.blob.core.windows.net/data?sp=w&st=2021-07-27T23:15:58Z&se=2022-12-31T07:15:58Z&spr=https&sv=2020-08-04&sr=c&sig=my-signature-properly-escaped-with-double-ampersands%%3D" --overwrite=false
But I'm getting hit with the following problems:
- Not all of my files in the directory are getting discovered.
When I execute it within the
.batfile I get "Failed" messages (Final Job Status: Failed). When I copy and paste the command directly into CMD it "Skips" the files (Still doesn't discover the new ones) (Final Job Status: CompleteWithSkipped).I'm also getting 2 files that failed (There is currently a lease on the blob and no lease ID was specified in the request).
Here is when I copy and paste the command directly into cmd:
I want to copy the non-existent .CSV files inside the directory.




