Looping/Repetition in Batch files

Hi All,
I'm just new to UNIX, does anyone know how to create a batch file in UNIX that does the following routines:
1.) process multiple files in a directory
in DOS, I set my sample input file as: set INPUTFILE=%1
in UNIX>> ????

2.) every file to be processed by executing a program (maybe a class file in UNIX)
in DOS >> for %%i in (*.txt) do D:\WINDOWS\system32\cmd.exe /v:ON/c C:\RPM\DosBatch\RPM.bat %%i
in UNIX >>????

3.)also has a trapping error wherein I can create a log file
in DOS >> %ERRORLEVEL% > error.log
in UNIX >> ????

Thanks!
gLeN EMAIL ADDRESS REMOVED

This is thread violates

(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post where your goal is to get an answer more quickly.
(10) Don't post your email address and ask for an email reply. The forums are for the benefit of all, so all Q&A should take place in the forums.

Mods, please close this.