jeudi 21 juillet 2016

Escape second word in IF statement in Batch

I've tried searching on Google, I've tried searching on StackOverflow, and I just can't find a simple way to escape the second word in an IF statement.

set /p operation=What would you like to do: 
IF %operation%==Copy files (
    rem code goes here
)

I know that it is because of the second word in the file, because if I delete the space inbetween "Copy" and "files", it works. The problem is, that is not natural, and it looks weird, so I just wanted to hear if there was a better way.

Thanks in advance.

P.S. Before you say "enclose it in quotes", no, that doesn't work either.

Aucun commentaire:

Enregistrer un commentaire