Enhancement #2 -- Delete your .REP after successful upload ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Once your .REP has been successfully imported by the BBS, you may want the script to go ahead and delete the .REP. This will prevent accidental upload of duplicate messages during subsequent mailrun sessions. While most mail readers will prompt you on whether or not to delete the .REP, I think it's better to have the script take care of this for you automatically for a couple reasons: a. It's possible to err when prompted by the mail reader by not deleting a .REP that should be deleted. b. If, for some reason, your .REP was uploaded to the BBS, but *wasn't* successfully imported to the BBS message base, then you'd probably want to upload it again next mailrun session. In this case, you might make the mistake of deleting the .REP when prompted by your mail reader. If the script is setup to delete the .REP upon successful upload/import, then you can *always* safely answer "No" to the mail reader prompt if it ever appears. Before you can code the section of your script that will delete uploaded .REPs, you need to determine what feedback the specific BBS provides on uploaded messages. This feedback is normally in the form of a one line message something to the effect of "Upload Successful" or "Finished Importing 4 Messages" or "Importing Message Into {COMMO} Conference". For the sake of this lesson, let's assume the message is "Mail Upload Successful!". Here's an example of how you could code your script to automatically delete the .REP: . . {:MAIL} (mail subroutine macro id) {SETL 180,gby,,} (initialize "look" to 3 min) {GOLO gby,^jNO CARRIER^m} (error trap if carrier lost) {LOOK Command?} (wait for mail door prompt) {IFEX %repdir%%bbsid.rep,,send_d} (chk 2 see if .REP exists) {SEND u|} (.REP exists, send "u") {GOLO gby,^jNO CARRIER^m} (error trap if carrier lost) {LOOK ^XB01} (wait for ZModem string) {EXEC dsz port %_por sz %repdir%%bbsid.rep} (exec ZModem send) {CALO ul_end,del_rep,Mail Upload Successful!} (branch on msg) {:UL_END} (return point for "CALO") {GOLO gby,^jNO CARRIER^m} (error trap if carrier lost) {LOOK Command?} (mail door prompt after ul) {:SEND_D} (mail dl macro id) {SEND d|} (send "d" to mail door) . (remainder of script) . {:DEL_REP} (.REP delete routine macro ID) {EXEC del %repdir%%bbsid.rep} (delete the .REP packet) {RETU} (returns to "ul_end" since that is point specified by "CALO" command) ------------ As you can see, the "del_rep" sub-routine will only be executed upon receipt of the "Mail Upload Successful!" string. If the string isn't received, then the .REP will not be deleted. Remember: before coding a similar routine, be sure you know the *precise* message the BBS will send following a successful upload/import of your replies. If you remember the lesson where I mentioned "Minimalized prompts", the same technique could apply to the "success message", i.e., you may use as much/little of the "success" message for your trigger that would set it apart from other random occurring text. In the example above, "Successful!" may be enough..then again, you might need the full string. That's up to you to decide. We're only talking a few bytes here.. Jim