Both those commands are available at the command line, so writing a batch file is definitely possible. It sounds like you are running windows. I'll go ahead and write up a quick blog entry here with details, but you pretty much have what you need. The only additions should be:
1. Don't use the "-" in the command line parameters
2. Use the variable %1 to get the dbname inside your batchfile
3. check the ERRORLEVEL variable for nonzero results and respond accordingly.
You can find the details later today at
http://blogs.ingres.com/tech