home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / ktfc / ktfc0d5.zip / DATEFIL0.5 next >
Text File  |  2000-05-24  |  975b  |  38 lines

  1. ; File datefil0.5, copyright (C) Peter Lyall Easthope, 2000.
  2. ; All rights reserved.
  3. ;
  4. ; This Kermit script determines the name of a file according to the 
  5. ; current date.  If the file does not exist, one is created and 
  6. ; initial text is placed in it.  Finally a DOS batch file containing 
  7. ; one line, which opens EDIT on the date-named file, is created.
  8. ;
  9. echo {Beginning datefil}
  10. def InitOut {
  11.   open write \v(ndate).out
  12.   xif failure {
  13.     echo {Can't open editdate.bat}
  14.     echo {}
  15.     exit
  16.   }
  17.   writeln file {To: peter_easthope@gulfnet.pinc.com}
  18.   writeln file {Subject: }
  19.   writeln file {  }
  20.   writeln file {**EndOfMsg**}
  21.   writeln file {**EndOfMsg**}
  22.   close write-file
  23. }
  24.  
  25. if not exist {\v(ndate).out} InitOut
  26.  
  27. ; Make a DOS batch file with a command to edit the 
  28. ; yyyymmdd.out file.
  29. open write editdate.bat
  30. xif failure {
  31.   echo {Can't open editdate.bat}
  32.   echo {}
  33.   exit
  34. }
  35. writeln file {edit \v(ndate).out}
  36. close write-file
  37. exit
  38.