mardi 26 janvier 2021

Batch File If Statements causing close of CMD and not working

I am creating a should-be-simple batch file that will allow me to input a class name and it will take me to the correct google classroom. However, my if statement doesn't work, even when I input the word "Social Studies". It does not take me to my classroom, and on top of that, the CMD is just closed. When I remove the If Statement line, the code works fine and the cmd just stays open after inputting a class.

    set /p class="Enter Class: "

    IF "%class%" /I EQU "Social Studies" (START https://classroom.google.com) 
    
    cmd /k

Aucun commentaire:

Enregistrer un commentaire