Quotation Marks.
Posted: 29 Jul 2020 11:13
Good afternoon,
Being an old git, I have always had problems with knowing whether quotation marks should be used or not.
When browsing the Internet, there are many bits of code out there, some of which use quotation marks and some that don't to achieve thae SAME thing.
To try and clarify things in my head, I have a small selection of BITS of code that I would be grateful for guidance on please as to whether they are right or wrong and why!
As I said, these are just snipets . . .
What does this do . . .
Is there something like a cheat sheet?
I would really appreciate any input please.
Thanks in advance.
Being an old git, I have always had problems with knowing whether quotation marks should be used or not.
When browsing the Internet, there are many bits of code out there, some of which use quotation marks and some that don't to achieve thae SAME thing.
To try and clarify things in my head, I have a small selection of BITS of code that I would be grateful for guidance on please as to whether they are right or wrong and why!
As I said, these are just snipets . . .
Code: Select all
[01] if /i "%userinput%"=="0" goto Exit_Program
[02] %ComSpec% /c cleanmgr.exe
[03] if not exist %volume% %Drive%:\ (
[04] if /i "%Drive%"=="C" goto
[05] set "CANCEL_chkdsk="
[06] for %%I in (D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist "%%I:\\setup.exe" set setup=%%I
[07] PowerShell.exe Dism /get-wiminfo /wimfile:%setupdrv%:\sources\install.wim
[08] if %OS_Index%==""
[09] if defined autorun (for %%I in (D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist "%%I:\\sources\install.esd" set setupdrv=%%I)
[10] if not defined setupdrv (
[11] if %userinput% gtr 2 echo.
Code: Select all
set "params=%*"
I would really appreciate any input please.
Thanks in advance.