Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Meaning of curly brackets "}" in MSDOS batch files

881 views
Skip to first unread message

Kurt

unread,
Apr 1, 2001, 4:56:05 AM4/1/01
to
I sometimes see msdos batch files with expressions using curly brackets like
.... ?>}T

or

...... }T.*

What does that mean ?

Regards
Kurt

Phil Robyn

unread,
Apr 1, 2001, 5:03:01 AM4/1/01
to
Kurt wrote:

In this case, the curly bracket is being used as a character in a filename. It is
highly unlikely that someone would purposely name their files thusly; therefore,
a batch file that creates such unusually named files would probably not run
into a conflict with files that already exist on someone's computer. If a batch
file created files like 'myfile.txt', overwriting a file of the same name that already
existed on a user's computer, the user might be a little unhappy about having
his or her precious file overwritten....


Outsider

unread,
Apr 1, 2001, 8:02:03 AM4/1/01
to

It means the author of the batch may have good intentions,
but is confusing and misleading potential users. It is a
bad idea that has caught on or become fashionable with
certain batch programmers. The idea is to assume that
using the } symbol is a safe way of having a unique
(read: non preexistent) file/directory name. It is easy
enough to use a non confusing and non misleading name,
but many batch programmers refuse to do so because they
are lazy or more interested in looking cool or showing off
than anyone actually understanding or using their programs.

In other words, it means _nothing_ and this is the problem;
everything in a batch should have as much meaning as
practically possible so as to facilitate a potential
users understanding it.

Symbols should be used very sparingly for exactly this reason.
Symbols normally have some special meaning, for example:
(+ - / * ? = % " ~ , ; .) When any potential user reads a symbol,
the automatic questions that ALWAYS comes forth is: "What does
that mean? Does it have a special meaning? Why is it used?"

If it is deemed desireable by the author to use symbols
where none are required, than it is the responsibility
of the author to include an explanatory note.


Suggested reading:
http://bigfoot.com/~batfiles/basic/chap27.htm


--
<!-Outsider//->
MS-DOS 6.22, Windows for Workgroups 3.11, Netscape Navigator 4.08
MS-DOS 7.1, Windows 4.1 (a.k.a. 98), Netscape Navigator 4.74

Outsider

unread,
Apr 1, 2001, 8:25:31 AM4/1/01
to

It means the author of the batch may have good intentions,

Bjarni Juliusson

unread,
Apr 1, 2001, 9:51:06 AM4/1/01
to
Give a whole line that uses one. It might be an ansi.sys thing?


0 new messages