| You will need edit two lines...the "set default..." line and the "Mail..." Line
$ ! Notesuck.com
$
$
$ ! Procedure to perform batch update of a list of notesfiles,
$ ! save the update in files keyed to the current date, and mail
$ ! mail the update to yourself.
$ !
$ !
$ set default [****Your_preferred_(sub)directory_here]
$ say := write sys$output
$
$ say ""
$ start:
$ !
$ ! First, Determine what this month is.
$ !
$ if f$extract(0,1,f$time()) .eqs. " " then $day_str = f$extract(1,1,f$time())
$ if f$extract(0,1,f$time()) .nes. " " then $day_str = f$extract(0,2,f$time())
$write sys$output day_str
$ year_str = f$extract(9,2,f$time())
$ month_str = f$extract(3,3,f$time())
$ text_dest = year_str+month_str+day_str+"note.txt"
$
$ ! Scan notesfile list and go to subroutine to read
$ ! unseen notes in YYmmmDDNOTE.TXT where YY,mmm,DD
$ ! reflect the current date
$
$ set on
$ open/read/error=no_file dis_file notesuck.lst
$Read_note_name:
$ set on
$ read/end=end_file dis_file note_name
$ return := Read_note_name
$ goto subroutine
$
$! S u b r o u t i n e s
$!
$ subroutine:
$ open/write comfile temp.com
$ write comfile "$ notes
$ write comfile "open ''note_name'/noauto "
$ write comfile "save/append/all/unseen"
$ write comfile " ''year_str'''month_str'''day_str'note.txt"
$ write comfile " 1-last"
$ write comfile " set seen"
$ close comfile
$type temp.com
$ @temp.com
$ goto 'return
$
$no_file:
$ write sys$output "File NOTESUCK.LST Could not be found"
$ Goto exit
$end_file:
$ close dis_file
$ ASSIGN /USER NL: SYS$OUTPUT:
$ MAIL /SUBJ="Notesfiles Updates for today..." 'year_str''month_str''day_str'note.txt mccrohan
$ rename 'year_str''month_str''day_str'note.txt 'year_str''month_str''day_str'note.tmp
$ write sys$output "All files processed, exiting...."
$
$exit:
$ purge temp.com
$ exit
$ ! End of Notesuck.com
----------------------------------
Example of Notesuck.lst
celt
easynet
gateways
....etc
|