# Example Log File Download Script

- The script shown below can easily be adapted for different purposes.
- You can use the example below by viewing it in the Online Help and either:
  - Opening the file and copying the contents to the Procomm Aspect script editor
  - By copying the entire file to the Procomm Aspect script directory, then changing the filename extension from 'wri' to "was".

; Sample Procomm Plus Script for downloading Catalyst RTU Log Files. |
| proc main; Starts procedure (required)
| string Name = "RTUname.cap" ; Name of capture file to open
| set capture file Name ; Set name of capture file
| dial DATA "Catalyst" ; Dial Catalyst
| while $DIALING ; Loop while dialing
| Endwhile
| capture ON ; Open up the capture file
| waitfor "Enter PIN: "; Tells Procomm to wait for the RTU to ask for a PIN
| transmit "007^M"; Procomm transmits PIN back to Catalyst
| while $CARRIER ; Loop while connected to RTU
| waitfor "Logfile Download Complete"
| transmit "Logfile Download Complete^M"
| endwhile
| capture OFF ; Close the capture file
| pwexit; Close Procomm Plus (optional)
| endproc; Ends procedure (required)