> Maybe put in quotes?

In some circumstances you can put things in double-quotes at a DOS command-line 
to enclose "special" characters, but that doesn't always work and different 
versions of DOS do things differently.  Probably the simplest example of this 
is enclosing a long-file-name (at least if it contains spaces) in double-quotes.

But, as Eric noted, the double-quote character does some unexpected things when 
used with a SET command (like not even needing a closing quote).  Enclosing 
things in quotes won't fix the problem, at least not consistently across all 
DOS versions.

E.g., I just did a couple of simple tests in both MS-DOS 6.22 and 7.1:

  SET "Test=8"

creates an environment variable named "TEST with the contents of 8".

I also did:

  SET  Test=Test=8
  SET "Test=Test=8"

and got syntax error messages in both versions of MS-DOS.

***

In FreeDOS 1.2:

  SET "Test=8"

does the same things as MS-DOS.

But in FreeDOS 1.2:

  SET Test=Test=8

creates (correctly, IMHO) an environment variable called TEST with the contents 
of Test=8, and:

  SET "Test=Test=8"

creates an environment variable called "TEST with the contents of Test=8".

Bottom line is that FreeDOS (at least version 1.2) doesn't work the same way as 
MS-DOS, but I'm not 100% sure which way is "buggier".


_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to