nixgeek Posted March 9, 2007 Share Posted March 9, 2007 Writing a batchfile to automate some procedures at work, however I want the user to be able to run the batchfile without arguments and have it give them the correct syntax for the batchfile commands. I know an IF statement is involved but can't seem to figure it out. Any help is appreciated! nixgeek Quote Link to comment Share on other sites More sharing options...
Oberon Posted March 10, 2007 Share Posted March 10, 2007 Try: IF "%1" == "" GOTO help ...<do stuff here> goto end :help echo usage stuff here. :end Quote Link to comment Share on other sites More sharing options...
debianuser Posted March 25, 2007 Share Posted March 25, 2007 Writing a batchfile to automate some procedures at work, however I want the user to be able to run the batchfile without arguments and have it give them the correct syntax for the batchfile commands. I know an IF statement is involved but can't seem to figure it out.Any help is appreciated! nixgeek windows or linux? Quote Link to comment Share on other sites More sharing options...
Shaun Posted March 25, 2007 Share Posted March 25, 2007 Because those are the only 2 operating systems? Anyway I think if he meant *nix he would have said shell script and not batch file. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.