I have a simple DOS batch file, “copyin.bat” that has one variable, which is referenced by %1. The variable is the user’s own directory on our server. So if John wants to copy in my files to his directory, he just enters: “copyin John”.
However, sometimes the user will forget and just run the batch file without the variable, typing in “copyin” all by itself. How can I use the ErrorLevel variable or some other method to detect this and then issue this:
Echo You forgot to enter your Name – please rerun the program
Any ideas?