|
| Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free! |
HELP with DOS batch files
|
Original Message
|
Name: unknown
Date: April 16, 2006 at 21:22:28 Pacific
Subject: HELP with DOS batch filesOS: NACPU/Ram: NAModel/Manufacturer: 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.
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: jboy
Date: April 16, 2006 at 21:33:24 Pacific
|
Reply: (edit)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
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: Mechanix2Go
Date: April 16, 2006 at 22:38:46 Pacific
|
Reply: (edit)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
Report Offensive Follow Up For Removal
|
|
Response Number 3
|
Name: jboy
Date: April 16, 2006 at 23:21:44 Pacific
|
Reply: (edit)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
Report Offensive Follow Up For Removal
|
|
Response Number 4
|
Name: Mechanix2Go
Date: April 16, 2006 at 23:35:56 Pacific
|
Reply: (edit)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
Report Offensive Follow Up For Removal
|
|
Response Number 5
|
Name: jboy
Date: April 17, 2006 at 00:15:26 Pacific
|
Reply: (edit)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
Report Offensive Follow Up For Removal
|
|
Response Number 6
|
Name: Mechanix2Go
Date: April 17, 2006 at 03:16:29 Pacific
|
Reply: (edit)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
Report Offensive Follow Up For Removal
|
|
Response Number 7
|
Name: unknown
Date: April 17, 2006 at 09:11:07 Pacific
|
Reply: (edit)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)
Report Offensive Follow Up For Removal
|
|
Response Number 8
|
Name: IVO
Date: April 17, 2006 at 09:19:57 Pacific
|
Reply: (edit)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.
Report Offensive Follow Up For Removal
|
|
Response Number 9
|
Name: jboy
Date: April 17, 2006 at 17:03:49 Pacific
|
Reply: (edit)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
Report Offensive Follow Up For Removal
|

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
|
|
|