; Create new time/date stamped log every day log "upload.log" /new ; Set the directory where we will archive the zip files archivedir "C:\archive" ; Check to see if there are any files to upload getnextfile "C:\upload\*" IFERROR= $ERROR_NO_FILE_FOUND goto done ; Zip all files, using the built-in %datetime variable to name the zip file set zip_filename = %datetime + ".zip" zip zip_filename "C:\upload\*" /create ftplogon "MyUploadSite" sendfile zip_filename /archive iferror goto send_error FTPLOGOFF ; Clean up by deleting the uploaded files delete "C:\upload\*" goto done :send_error ; If we can't upload the file, just exit. We could add ; any other type error handling we want here. :done exit