windows - Why does %%I work in .cmd? -
i have found in multiple online forums , blogs .cmd files utilize %i (or %a, etc.) loops , batch files require 2 percent symbols (%%i). however, line of code has been working me in .cmd file:
for /l %%i in (%case%, 1, %endcase%) ( aws s3 cp s3://[url]/%user%/%%i "c:\users\[directories]\accuracy_testing\datax\%user%_%%i" --recursive )
in code, using command line interface aws download files associated multiple ids. case , endcase arguments parsed file.
why work, when .cmd files should using %i instead of %%i?
you're confusing .cmd files cmd prompt. .cmd files batch files (with few differences people won't notice), while cmd prompt command line itself.
scripts use %%i, command prompt uses %i.
Comments
Post a Comment