I have found in multiple online forums and blogs that .cmd files utilize %I (or %A, etc.) for loops and batch files require two percent symbols (%%I). However, this line of code has been working well for me in a .cmd file:
FOR /L %%I IN (%case%, 1, %endcase%) DO (
aws s3 cp s3://[URL]/%user%/%%I "C:\Users\[directories]\Accuracy_Testing\datax\%user%_%%I" --recursive
)
In this code, I am using the command line interface for AWS to download files associated with multiple IDs. case and endcase are arguments parsed to the file.
Why does this work, when .cmd files should be using %I instead of %%I?