LOG "wells_fargo_lockbox" /new TRACELOG "wells_fargo_lockbox_trace" /new DELETE "sitelist.txt" FTPLOGON "sft.wellsfargo.com" /servertype=HTTPS /trust=all /clientcert FTPCD "outbound" ;; generate the sitelist.txt FTPLIST ;; throw out the first record as it is simply the total bytes present. READFILE "sitelist.txt" record IFERROR GOTO done ;; if there are no files, there are no records in the sitelist.txt :next_record READFILE "sitelist.txt" record /record=next IFERROR GOTO done DISPLAY record ;; last segment of line is the filename (filename should have no spaces) SETSUBSTR spaces = record " " SETNUM depth = spaces + 1 SETEXTRACT filename = record " " depth RCVFILE filename /delete /nostatus IFERROR= $ERROR_SUCCESS GOTO next_record :done FTPLOGOFF EXIT