WHERE is the documentation that explains the apparently anomalous behaviour of the equal sign below?
STEPS TO REPRODUCE (at a command prompt):
example with ECHO:
H:\BUGS>echo abc > a-b.txt H:\BUGS>echo cde > c=d.txt H:\BUGS>dir 2016-03-13 19:54 6 a-b.txt 2016-03-13 19:54 12 c H:\BUGS>type a-b.txt abc H:\BUGS>type c cde =d.txt
636465203D642E7478740D0A c d e = d . t x t
616263200D0A a b c
HOWEVER (here the '=' becomes part of the valid file names if i use quotes):
H:\BUGS>ren a-b.txt a=b.txt The syntax of the command is incorrect. H:\BUGS>ren a-b.txt "a=b.txt" H:\BUGS>ren c "c=d.txt" H:\BUGS>dir 2016-03-13 19:54 6 a=b.txt 2016-03-13 19:54 12 c=d.txt
an equal sign is a valid file name character.
FWIW, it appears that a '=' not in quotes has a bizarre special meaning on a DOS command line.
OTOH, the '=' is a valid file name character.
"Naming Files, Paths, and Namespaces"
using Windows 8.1
H:\BUGS>echo def > "d=e.txt" H:\BUGS>dir 2016-03-13 20:36 6 d=e.txt H:\BUGS>type "d=e.txt" def
the syntax above works.
Michael Frank helped me find more information.
His information enabled me to locate an interesting SO article "cmd- comma to separate parameters Compared to space?"
H:\BUGS>type Frank.cmd @echo %1/%2/%3 H:\BUGS>Frank 1 2 3 1/2/3 H:\BUGS>Frank 1=2=3 1/2/3 H:\BUGS>Frank 1;2;3 1/2/3 H:\BUGS>Frank 1,2,3 1/2/3 H:\BUGS>Frank 1/2/3 1/2/3//
in the above, various characters are used as delimiters.
/ was used as a delimiter above, an extra
/ is emitted; that would be a bug imho.
at "cmd- comma to separate parameters Compared to space?", Tim Robinson wrote "on Windows, programs are responsible for parsing their own command lines. The shell parses redirects and pipes, then passes the rest of the command line to the program in one string"
BOTTOM LINE: it appears that where a delimiter is needed,
= acts as a delimiter; in some cases
= causes a syntax error, in other cases
= is simply an equal sign.
end edit #2.
^. For example:
=behaves like this;
=is not one of the special characters listed here "Naming Conventions" ~~
` (backslash);|` (vertical bar or pipe);