Windows: cmd: double quotes vs single quotes

Self-tutoring about the Windows command prompt: the tutor mentions its treatment of double vs single quotes.

In many computer languages, double or single quotes are interchangeable or else give similar effect in many situations. Such is not the case with the Windows command prompt.

In my experience, Windows command prompt, aka cmd, treats double quotes the way you’d expect: they enclose a string. Single quotes, however, don’t seem to have that effect. I’ve read that cmd treats single quotes as alphanumeric characters rather than special purpose ones: perhaps, to it, ‘hello’ is a seven-character string in the way that 9hello_ is.

So, in my experience, with cmd, when I think I might need quotes, I use double, not single. I hope to talk even more about this soon:)

Source:

stackoverflow.com

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Leave a Reply