set "Def1="
set "VAR=bla bla %xx% bla !xx! bla"
set "LSW=%Nibble3%%Nibble2%%Nibble1%%Nibble0%"
set "Array[One]=Entrée 1"
set "Array[1]=Entrée 1"
set "Result!Counter!=%%A"
set "Result=%%A"
set "SInt32=%~2"
set "SInt32=-2147483648"
set "ScriptName=%~nx0"
set "VAR=%VAR:chaîne=voiture%"
set "VAR=%VAR:~3,6%"
set "VAR=%VAR:~31,63%"
set "Var=%Var% %%A"
set "%~1=%value%"
set VAR=bla bla %xx% !xx! bla
set VAR="bla bla %xx% !xx! bla"
set VAR_Saisie
set line=!line:~0,48!

set VAR_Saisie_Un= ma saisie un:
set "Var2=Entrez une chaîne: " 0>nul

set "Addition+=!foobar!"
set "Attrib0+=1"
set "Attrib1=1","Attrib2=2","Attrib3=3","Attrib4=4","Attrib5=5"
set "Attrib2*=2"
set "Attrib3-=2"
set "Attrib4/=2"
set "Attrib5%%=2"
set "Cinq=10 / 2"
set "Hexa=0x1 + 0x3"
set "Huit=8+Dix","Neuf=10-Un"
set "Mod=5 % 2"
set "Mod=5 %% 2"
set "Nibble%%A=15 - Nibble%%A"
set "Nibble%%A=Nibble7 %% 16", "Nibble7/=16"
set "Nibble0= SInt32 %% 16","HighOrder0= SInt32 / 16"
set "SInt32"
set "SInt32=~SInt32"
set "Sept=(( 2 + 1 ) * 2 ) + 1"
set "Val1AttribSwitchR=Val1","Val1AttribSwitchR>>=15"
set "Val1SwitchL01=Val1<<1","Val1SwitchL15=Val1<<15","Val1SwitchL31=Val1<<31"
set "Val3AttribXorVal4=Val3","Val3AttribXorVal4^=Val4"
set "Val3LogicalAndVal4=Val3 & Val4"
set "Val3LogicalOrVal4=Val3 | Val4"
set "Val3LogicalXorVal4=Val3 ^ Val4"
set "Var=09" 2>nul
set VAR_Calcul_Un=1+10
set DOW=(ANSI_DATE+1)%%7+1

rem bla bla ^& bla bla & bla bla
::bla bla ^& bla bla & bla bla

echo %VAR%
@echo off
@echo on
cls
@echo off & cls
echo. & echo. & echo 1 & echo 2
pause & exit 0
echo foo ^& ^| ^^ ^< ^> ^( ^)
echo foo ^
echo bar &rem here, echo is not a command
echo %%
echo %PATH%
echo %HomeDrive%\Users\%UserName%
echo %VAR:~0,2% %VAR:~-6% %VAR:~0,-7%
echo VAR1: %VAR1%
echo %Val1% ^<^< 1: %Val1SwitchL01%
echo %Val3% ^|= %Val4%: %Val3AttribOrVal4%
echo %X:une=ma%
echo %~dpnx$ComSpec:1 %~nx0.
echo [ %~1 ]
echo %ScriptName% [/p^|/P] /hex ^<number^>
echo %ScriptName% {/?^|-?^|/h^|-h^|/help^|-help}
mkdir "%cd%\foo\beer"
type txt|findstr ^^bar
call >>"%cd%\foo\bar\bar.bat"
runas %UserName% "cmd /c \"notepad \"%cd%\\%~nx0\""
timeout 10
exit
test.bat arg
test.bat arg^
arg

call >>test.bat
echo abc2>file
echo abc 2>file
more<COMx
2>nul set "var=foo" && 2>nul set "var2=bar"
2>nul set "nb=09" && 2>nul set "nb2=07"
2>nul set "var=foo" || echo Erreur de la commande : set "var=foo"
2>nul set "nb=09" || echo Erreur de la commande : set /a "nb=09"
0>nul >&3 set "=%%a "
2>nul set "var=foo" || echo Erreur de la commande : set "var=foo"
1>"%cd%\test.txt" echo line 1
1>>"%cd%\test.txt" echo ;commentary
<&3>logInput.txt type test.txt
(
echo foo
echo bar
)>>txt

(
2>nul set "var=09"
) || (
echo [Erreur] 1 set /a "var=09"
) && (
echo [Ok] 1 set /a "var=09"
)

3>>buffer3 (
1<&3 echo Foo
1>&3 echo Bar
0>nul >&3 set "=Foo"
>&3 echo Bar
)

if %value% equ !%1! (
endlocal & (
echo %1
exit 0
)
)

if "%cd%" echo %cd% exists
if Def1 (
echo Def1 is defined
)
if not Def2 (
echo Def2 is not defined
) else (
echo Def3
)

if not 1 echo no error
if 1 echo code = %ErrorLevel%.

if "%s1%" GTR 1
echo "gtr".
else if "%s1%" EQU "%s2%" (
echo "eq".
)
if "%s1%" LSS "%s2%" (
echo "lss".
) else if "%s1%" NEQ "%s2%" (
echo "neq".
)

if text.txt 9>>buffer9 (
>&9 echo Le fichier text.txt a été trouvé.
)

if %~2 GEQ 1 echo ok
if "%x%"=="%y%" echo ==
if not "%x%"=="%y%" echo !=
if "%x%"=="%y%" echo ==
if "%~1"=="" goto
if %~1 EQU /P set "UpperPrefix=1"
if "!FixLine:~0,1!"=="[" echo ok
if %CasseSensitive% "%%~b"=="%IniEntrie%" echo %%a
if "!foo:~%%a,1!"=="&" ( call "!foo:~%%a,1!" "%foo%" )

goto

call
goto

for %%A in (texte) do echo %%A
for %%B in ("%cd%") do if %%B echo %%B
for %%A in (a,z) do (
set "Var=%Var% %%A"
)
for %%A in (One,Two,Three) do echo !Array[%%A]!
if "%NegNum%"=="true" for %%A in (0 1 7) do set "Nibble%%A=15 - Nibble%%A"
for %%A in ("%cd%\foo\*") do echo %%A
for "%cd%\foo" %%B in ("*.bat") do echo %%~B
for %%A in (1 1 20) do echo Le paramètre A a pour valeur %%A.
for %%B in (1 1 !Counter!) do if not "!Var%%B!"=="" echo !Var%%B!
for %%A in (0 1 4096) do (
if "!str:~%%A,1!"=="" exit %%A
)
for "eol=; delims=" %%A in ('type test.txt') do echo %%A
for "tokens=1-5*" %%A in ("1 2 3 4 5 6 7 8 9") do (
echo %%A
echo %%B
)
for "usebackq delims=" %%A in (`type "%cd%\%~nx0"`) do (
echo %%A
)
for "usebackq delims=" %%A in (`type text.txt^|find ""`) do (
for "tokens=1-2 delims=[]" %%a in ("%%A") do echo Ligne %%a: %%b
)
for "delims=" %%a in ('type text.txt') do (((
echo %%a | findstr \^<foo 1>&3
echo %%a | findstr \^<bar 1>&4
echo %%a | findstr bar\^> 1>&5
) 5>>buffer5
) 4>>buffer4
) 3>>buffer3