At 09:35 PM 12/8/2006 -0500, K Mitchell wrote: > > I've just finished putting mine all together. Each of the components have >been tested individually, tonight shortly after midnight will be the first >test of it in it's entirety. In the way of explanation, here's what I'm >doing each night shortly after midnight: > >- moving the current logfile to a subfolder, thus rotating the logfiles >- renaming the file to add the date -this uses the Namedate utility I found >at http://www.informatics-consulting.de/software/namedate.htm >- uploading the file >- moving the file to yet another subfolder -this is because the upload >script uses * to cover the date variable, so it wouldn't be good to have 2 >or more dated files in the same folder >- sending myself an email confirming that the process has completed >successfully
This didn't quite work as planned. Apparently wput doesn't recognize variables in the filename, so I had to swap some lines and do the upload before the renaming to add the date. I had been hoping to date it before sending so that, in the odd chance that my prior log hadn't been processed yet, the new file would have a different name and upload with no problems. I'll just have to hope that my logs get processed within 24 hours. Here's the new .cmd file: @echo off c: cd c:\imail\sniffer move c:\imail\sniffer\licenseID.log logs cd c:\imail\sniffer\logs wput -nd licenseID_*.log ftp://snifferlog:[EMAIL PROTECTED] echo Log upload completed! >> sniffupld.txt namedate /UYO-1Z:"ymd" "licenseID.log" echo Log dated! >> sniffupld.txt move c:\imail\sniffer\logs\licenseID_*.log sent echo Log moved to Sent folder! >> sniffupld.txt c:\imail\imail1 -f c:\imail\sniffer\logs\sniffupld.txt -s "Sniffer log upload on %COMPUTERNAME%" -t [EMAIL PROTECTED] -u sniffer -h yourdomain.net echo Confirmation emailed! del c:\imail\sniffer\logs\sniffupld.txt :Done -- Kirk Mitchell-General Manager [EMAIL PROTECTED] Keystone Connect Unlock Your World Altoona, PA 814-941-5000 http://www.keyconn.net ############################################################# This message is sent to you because you are subscribed to the mailing list <[email protected]>. To unsubscribe, E-mail to: <[EMAIL PROTECTED]> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]> Send administrative queries to <[EMAIL PROTECTED]>
