|
All, I see your point. Thanks again for your help. It worked like a charm. Here is the working script. Any comments? I am still a newbie at this.
; COMMENT: Copies NT Backup log files to specified location, renames them to date of Backup ; ======================================================================== ;Break on CLS ; ======================================================================== $server = "@WKSTA" ;Server name $logdir = "\\$server\backup" ;Share where NTBACKUP log files exist $logfile = "\\$server\backup\*.log" ;Logfiles $logdest = "\\ocnfp2\it_share\backups" ;Destination of log files $buday = "@MDAYNO" ; ======================================================================== ;Rename log file ; ======================================================================== select case exist ($logdir + "\backup01.log") shell '%comspec% /c ren "$logdir\backup01.log" "$buday @month @year.log"' case exist ($logdir + "\backup02.log") shell '%comspec% /c ren "$logdir\backup02.log" "$buday @month @year.log"' case exist ($logdir + "\backup03.log") shell '%comspec% /c ren "$logdir\backup03.log" "$buday @month @year.log"' case exist ($logdir + "\backup04.log") shell '%comspec% /c ren "$logdir\backup04.log" "$buday @month @year.log"' case exist ($logdir + "\backup05.log") shell '%comspec% /c ren "$logdir\backup05.log" "$buday @month @year.log"' case exist ($logdir + "\backup06.log") shell '%comspec% /c ren "$logdir\backup06.log" "$buday @month @year.log"' case exist ($logdir + "\backup07.log") shell '%comspec% /c ren "$logdir\backup07.log" "$buday @month @year.log"' case exist ($logdir + "\backup08.log") shell '%comspec% /c ren "$logdir\backup08.log" "$buday @month @year.log"' case exist ($logdir + "\backup09.log") shell '%comspec% /c ren "$logdir\backup09.log" "$buday @month @year.log"' endselect
sleep 2
copy "$logdir\*.*" "$logdest"
sleep 1
del "$logdir\*.*"
exit
|