Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Can anyone explane this...
if not %1*==* goto loop ????
(it's from setramd.bat from windwos 98 startup disk)
I specificly need to know what the * mean.

New to DOS?
The '*' is one of the wildcard characters, and can be loosely translated as 'any'
a bit more here
We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true

jboy is correct as usual.
In this case, and I assume the line is actually:
if not %1*==* goto loop
[no string of ?]
the gist is that if %1 is nul [not set] then:
*==*
is evaluated as TRUE and the batch goes to the label named LOOP.
If %1 is set [NOT nul] the:
*==*
is evaluated as FALSE and the batch proceeds to the next line.
=====================================
If at first you don't succeed, you're about average.M2Go

Sure - the trailing '?'s must be punctuation ; )
Seems like error handling.
I suspect if the wildcard concept is a new one, likely quite a bit of ground left to cover
We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true

While we're at it...
The batch files on a 98 startup disk are not recommended as a good example of scripting from which to learn.
To me they look more like a fruit salad.
And we don't even need to mention the wisdom of extracting stuff from CAB to ramdisk.
=====================================
If at first you don't succeed, you're about average.M2Go

True - not what I'd consider as a good starting point to DOS batching - just *a bit* convoluted
Maybe the ultimate goal will be revealed
We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true

In #2 I ignored the "not", so what I wrote is 180° out.
If %1 is NOT nul, it goes to the loop.
=====================================
If at first you don't succeed, you're about average.M2Go

TKS!!! :)
Now what do the * represent?By the way im just fiddeling around with the 98 startup disk to do waht I want it to do.
(the string of ? was the pucuation at the end of the sentance. Guess I shouldn't have put it there)

In the posted statement the * has no special meaning, it's just a filler to enable the %1 parameter is set to nul. You can replace it with any other character you like.

Great... now what do the * represent ?
("Rainman"?)
We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |