1.

Solve : What is your preferred way of checking for parms?

Answer»

Just wondering if people have a favourite WAY of testing for parameters?

Do you just test the total number of parameters, or each one individually?

ThanksHow about

Code: [Select]echo off
if {%1}=={} echo No paramsOr, if you require 5 parms
Code: [Select]echo off
if not X%6==x (
  echo Try again: Too many parms
  goto ADIOS
)
if x%5==x (
  echo Try again: Not enough parms
  goto Adios
)
echo Good Man, you game me 5 parms
:Adios
Mac



Discussion

No Comment Found