Answer the question
In order to leave comments, you need to log in
Creating many folders in Windows?
Good day, there is such a code
chcp 1251
set papka=1
:1
set /A papka=papka+1
md 1 %papka%
if not %papka%==20 goto 1
del virus.bat
Answer the question
In order to leave comments, you need to log in
In batch files, all variables are strings!
set /a for arithmetic converts strings to numbers, does the operations, and stores the string in the result.
Therefore, padding with zeros is simple: we add the maximum required number of zeros to the number, then remove the excess using the substring extraction operation.
To extract substrings read:
set /?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question