Loops code example
Example 1: loops
for {} in {}:
Example 2: cmd for loop
REM
For %F in (*) do copy %F C:\User\
REM
REM
REM
REM
@echo off
setlocal
set file=C:\Users\l72rugschiri\Desktop\fs.cfg
for %%N IN ("%file%") do (
echo filedrive=%%~dN
echo filepath=%%~pN
echo filename=%%~nN
echo fileextension=%%~xN
echo default=%%N
)
Example 3: for loops
MyString = ""
for i in range(5):
MyString += "hi"
print(MyString)
Example 4: loops in coding
Do
X = 5+2
Loop Until X > 5
Example 5: loops in coding
Do
Do_Something
Loop