Computing.Net > Forums > Programming > HELP with DOS batch files

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

HELP with DOS batch files

Reply to Message Icon

Name: unknown
Date: April 16, 2006 at 21:22:28 Pacific
OS: NA
CPU/Ram: NA
Product: NA
Comment:

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.




Sponsored Link
Ads by Google

Response Number 1
Name: jboy
Date: April 16, 2006 at 21:33:24 Pacific
Reply:

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


0

Response Number 2
Name: Mechanix2Go
Date: April 16, 2006 at 22:38:46 Pacific
Reply:

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



0

Response Number 3
Name: jboy
Date: April 16, 2006 at 23:21:44 Pacific
Reply:

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


0

Response Number 4
Name: Mechanix2Go
Date: April 16, 2006 at 23:35:56 Pacific
Reply:

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



0

Response Number 5
Name: jboy
Date: April 17, 2006 at 00:15:26 Pacific
Reply:

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


0

Related Posts

See More



Response Number 6
Name: Mechanix2Go
Date: April 17, 2006 at 03:16:29 Pacific
Reply:

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



0

Response Number 7
Name: unknown
Date: April 17, 2006 at 09:11:07 Pacific
Reply:

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)


0

Response Number 8
Name: IVO
Date: April 17, 2006 at 09:19:57 Pacific
Reply:

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.


0

Response Number 9
Name: jboy
Date: April 17, 2006 at 17:03:49 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: HELP with DOS batch files

Need Help with DOS batch file .. www.computing.net/answers/programming/need-help-with-dos-batch-file-/12751.html

DOS Batch File Commands www.computing.net/answers/programming/dos-batch-file-commands/14637.html

batch file help www.computing.net/answers/programming/batch-file-help/16293.html