Tech Support > Operating Systems > Windows NT > Batch file question
Batch file question
Posted by Invisible on December 11th, 2003


OK, so I've written a .CMD file that requires 1 argument.

How do I alter the script so that it prints a message and terminates if I
forget to pass any parameters?

Thanks.


Posted by Phil Robyn on December 11th, 2003


Invisible wrote:
if [%1] equ [] (
echo/You forgot to pass me a parameter.
goto :EOF
)

--
Phil Robyn
Univ. of California, Berkeley

u n z i p m y a d d r e s s t o s e n d e - m a i l


Posted by Invisible on December 11th, 2003


Thankies ;-)




Similar Posts