Warning, /frameworks/syntax-highlighting/autotests/input/test.bat is written in an unsupported language. File is not indexed.

0001 set "Def1="
0002 set "VAR=bla bla %xx% bla !xx! bla"
0003 set "LSW=%Nibble3%%Nibble2%%Nibble1%%Nibble0%"
0004 set "Array[One]=Entrée 1"
0005 set "Array[1]=Entrée 1"
0006 set "Result!Counter!=%%A"
0007 set "Result=%%A"
0008 set "SInt32=%~2"
0009 set "SInt32=-2147483648"
0010 set "ScriptName=%~nx0"
0011 set "VAR=%VAR:chaîne=voiture%"
0012 set "VAR=%VAR:~3,6%"
0013 set "VAR=%VAR:~31,63%"
0014 set "Var=%Var% %%A"
0015 set "%~1=%value%"
0016 set VAR=bla bla %xx% !xx! bla
0017 set VAR="bla bla %xx% !xx! bla"
0018 set VAR_Saisie
0019 set line=!line:~0,48!
0020 
0021 set /p VAR_Saisie_Un=    ma saisie un:
0022 set /p "Var2=Entrez une chaîne:    " 0>nul
0023 
0024 set /a "Addition+=!foobar!"
0025 set /a "Attrib0+=1"
0026 set /a "Attrib1=1","Attrib2=2","Attrib3=3","Attrib4=4","Attrib5=5"
0027 set /a "Attrib2*=2"
0028 set /a "Attrib3-=2"
0029 set /a "Attrib4/=2"
0030 set /a "Attrib5%%=2"
0031 set /a "Cinq=10 / 2"
0032 set /a "Hexa=0x1 + 0x3"
0033 set /a "Huit=8+Dix","Neuf=10-Un"
0034 set /a "Mod=5 % 2"
0035 set /a "Mod=5 %% 2"
0036 set /a "Nibble%%A=15 - Nibble%%A"
0037 set /a "Nibble%%A=Nibble7 %% 16", "Nibble7/=16"
0038 set /a "Nibble0= SInt32 %% 16","HighOrder0= SInt32 / 16"
0039 set /a "SInt32"
0040 set /a "SInt32=~SInt32"
0041 set /a "Sept=(( 2 + 1 ) * 2 ) + 1"
0042 set /a "Val1AttribSwitchR=Val1","Val1AttribSwitchR>>=15"
0043 set /a "Val1SwitchL01=Val1<<1","Val1SwitchL15=Val1<<15","Val1SwitchL31=Val1<<31"
0044 set /a "Val3AttribXorVal4=Val3","Val3AttribXorVal4^=Val4"
0045 set /a "Val3LogicalAndVal4=Val3 & Val4"
0046 set /a "Val3LogicalOrVal4=Val3 | Val4"
0047 set /a "Val3LogicalXorVal4=Val3 ^ Val4"
0048 set /a "Var=09" 2>nul
0049 set /a VAR_Calcul_Un=1+10
0050 set /a DOW=(ANSI_DATE+1)%%7+1
0051 
0052 rem bla bla ^& bla bla & bla bla
0053 ::bla bla ^& bla bla & bla bla
0054 
0055 echo %VAR%
0056 @echo off
0057 @echo on
0058 cls
0059 @echo off & cls
0060 echo. & echo. & echo 1 & echo 2
0061 pause & exit /b 0
0062 echo foo ^& ^| ^^ ^< ^> ^( ^)
0063 echo foo ^
0064 echo bar &rem here, echo is not a command
0065 echo %%
0066 echo %PATH%
0067 echo %HomeDrive%\Users\%UserName%
0068 echo %VAR:~0,2% %VAR:~-6% %VAR:~0,-7%
0069 echo VAR1: %VAR1%
0070 echo %Val1% ^<^< 1: %Val1SwitchL01%
0071 echo %Val3% ^|= %Val4%: %Val3AttribOrVal4%
0072 echo %X:une=ma%
0073 echo %~dpnx$ComSpec:1 %~nx0.
0074 echo [ %~1 ]
0075 echo %ScriptName% [/p^|/P] /hex ^<number^>
0076 echo %ScriptName% {/?^|-?^|/h^|-h^|/help^|-help}
0077 mkdir "%cd%\foo\beer"
0078 type txt|findstr ^^bar
0079 call :WriteFile >>"%cd%\foo\bar\bar.bat"
0080 runas /User:%UserName% "cmd /c \"notepad \"%cd%\\%~nx0\""
0081 timeout /t 10 /nobreak
0082 exit /b
0083 test.bat arg
0084 test.bat arg^
0085 arg
0086 
0087 call :WriteTestBat >>test.bat
0088 echo abc2>file
0089 echo abc 2>file
0090 more<COMx
0091 2>nul set "var=foo" && 2>nul set "var2=bar"
0092 2>nul set /a "nb=09" && 2>nul set /a "nb2=07"
0093 2>nul set "var=foo" || echo Erreur de la commande : set "var=foo"
0094 2>nul set /a "nb=09" || echo Erreur de la commande : set /a "nb=09"
0095 0>nul >&3 set /p "=%%a "
0096 2>nul set "var=foo" || echo Erreur de la commande : set "var=foo"
0097 1>"%cd%\test.txt" echo line 1
0098 1>>"%cd%\test.txt" echo ;commentary
0099 <&3>logInput.txt type test.txt
0100 (
0101   echo foo
0102   echo bar
0103 )>>txt
0104 
0105 (
0106     2>nul set /a "var=09"
0107 ) || (
0108     echo [Erreur] 1           set /a "var=09"
0109 ) && (
0110     echo [Ok]     1           set /a "var=09"
0111 )
0112 
0113 3>>buffer3 (
0114     1<&3 echo Foo
0115     1>&3 echo Bar
0116     0>nul >&3 set /p "=Foo"
0117     >&3 echo Bar
0118 )
0119 
0120 if %value% equ !%1! (
0121    endlocal & (
0122       echo %1
0123       exit /b 0
0124    )
0125 )
0126 
0127 if exist "%cd%" echo %cd% exists
0128 if defined Def1 (
0129     echo Def1 is defined
0130 )
0131 if not defined Def2 (
0132     echo Def2 is not defined
0133 ) else (
0134     echo Def3
0135 )
0136 
0137 if not errorlevel 1 echo no error
0138 if errorlevel 1 echo code = %ErrorLevel%.
0139 
0140 if "%s1%" GTR 1
0141     echo "gtr".
0142 else if "%s1%" EQU "%s2%" (
0143     echo "eq".
0144 )
0145 if /i "%s1%" LSS "%s2%" (
0146     echo "lss".
0147 ) else if /i "%s1%" NEQ "%s2%" (
0148     echo "neq".
0149 )
0150 
0151 if exist text.txt 9>>buffer9 (
0152     >&9 echo Le fichier text.txt a été trouvé.
0153 )
0154 
0155 if %~2 GEQ 1 echo ok
0156 if "%x%"=="%y%" echo ==
0157 if not "%x%"=="%y%" echo !=
0158 if /i "%x%"=="%y%" echo ==
0159 if "%~1"=="" goto Init
0160 if %~1 EQU /P set /a "UpperPrefix=1"
0161 if "!FixLine:~0,1!"=="[" echo ok
0162 if %CasseSensitive% "%%~b"=="%IniEntrie%" echo %%a
0163 if "!foo:~%%a,1!"=="&" ( call :Injection "!foo:~%%a,1!" "%foo%" )
0164 
0165 goto Label
0166 :Label
0167 call :Label
0168 goto :eof
0169 
0170 for %%A in (texte) do echo %%A
0171 for %%B in ("%cd%") do if exist %%B echo %%B
0172 for %%A in (a,z) do (
0173     set "Var=%Var% %%A"
0174 )
0175 for %%A in (One,Two,Three) do echo !Array[%%A]!
0176 if /i "%NegNum%"=="true" for /l %%A in (0 1 7) do set /a "Nibble%%A=15 - Nibble%%A"
0177 for /d %%A in ("%cd%\foo\*") do echo %%A
0178 for /r "%cd%\foo" %%B in ("*.bat") do echo %%~B
0179 for /l %%A in (1 1 20) do echo Le paramètre A a pour valeur %%A.
0180 for /l %%B in (1 1 !Counter!) do if not "!Var%%B!"=="" echo !Var%%B!
0181 for /l %%A in (0 1 4096) do (
0182     if "!str:~%%A,1!"=="" exit /b %%A
0183 )
0184 for /f "eol=; delims=" %%A in ('type test.txt') do echo %%A
0185 for /f "tokens=1-5*" %%A in ("1 2 3 4 5 6 7 8 9") do (
0186     echo %%A
0187     echo %%B
0188 )
0189 for /f "usebackq delims=" %%A in (`type "%cd%\%~nx0"`) do (
0190     echo %%A
0191 )
0192 for /f "usebackq delims=" %%A in (`type text.txt^|find /n /v ""`) do (
0193     for /f "tokens=1-2 delims=[]" %%a in ("%%A") do echo Ligne %%a: %%b
0194 )
0195 for /f "delims=" %%a in ('type text.txt') do (((
0196             echo %%a | findstr \^<foo 1>&3
0197             echo %%a | findstr \^<bar 1>&4
0198             echo %%a | findstr bar\^> 1>&5
0199         ) 5>>buffer5
0200     ) 4>>buffer4
0201 ) 3>>buffer3