home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / sys_util / setdt110.zip / SETDT.DOC < prev    next >
Text File  |  1993-09-29  |  3KB  |  94 lines

  1.  
  2.         Name: SETDT.DOC - Documentation file for SETDT.EXE     Page 1 of 2
  3.  
  4.      Purpose: SETDT.EXE gets the system's current date and time, parses
  5.               it, and writes the results to "SET_DT.BAT" in the current
  6.               directory.  When "SET_DT.BAT" is subsequently run it sets
  7.               the following environment variables:
  8.  
  9.               MM=nn  (Month)
  10.               DD=nn  (Day)
  11.               YY=nn  (Year)
  12.               HR=nn  (Hour)
  13.               MN=nn  (Minute)
  14.               SC=nn  (Second)
  15.  
  16.       Syntax: SETDT
  17.  
  18.        Notes: Use the following three lines in a BATch file to call both
  19.               SETDT.EXE and SET_DT.BAT, and then delete the SET_DT.BAT:
  20.  
  21.               SETDT.EXE
  22.               call SET_DT.BAT
  23.               del SET_DT.BAT
  24.  
  25.               Example of what's in SET_DT.BAT when SETDT.EXE is run:
  26.  
  27.               @echo off
  28.               set mm=09
  29.               set dd=29
  30.               set yy=93
  31.               set hr=07
  32.               set mn=43
  33.               set sc=11
  34.  
  35.               Then when SET_DT.BAT is subsequently run the following will
  36.               be in your environment (type SET to view the environment):
  37.  
  38.               mm=09
  39.               dd=29
  40.               yy=93
  41.               hr=07
  42.               mn=43
  43.               sc=11
  44.  
  45.               A use for the above for example, would be to create a file
  46.               using the system's current date as a filename for a nightly
  47.               ZIP file of whatever.  Example ZIP command:
  48.  
  49.               PKZIP -ex -i -a+ C:\WP51\DATA\*.* %YY%%MM%%DD%
  50.  
  51.               would create a ZIP file named 930929.ZIP containing any
  52.               files in the C:\WP51\DATA directory that had the "A"rchive
  53.               attribute set and subsequently remove the "A" attribute.
  54.  
  55.         Name: SETDT.DOC - Documentation file for SETDT.EXE     Page 2 of 2
  56.  
  57.               Another use would be as an automatic TAPE name when erasing
  58.               or formatting tapes from the command line using Colorado
  59.               Memory's TAPE.EXE program.  For instance, when I format a
  60.               tape (with version 2.54 of TAPE.EXE) I use the command:
  61.  
  62.               TAPE FORMAT /N="%yy%%mm%%dd%f%hh%%mm%"
  63.  
  64.               (the "f" between the date and time means the tape was
  65.               formatted, not simply "e" for erased).
  66.  
  67.         Misc: The QBASIC code used to create SETDT.EXE:
  68.  
  69.               OPEN "set_dt.bat" FOR OUTPUT AS #1
  70.               d$ = DATE$
  71.               mm$ = MID$(d$, 1, 2)
  72.               dd$ = MID$(d$, 4, 2)
  73.               yy$ = MID$(d$, 9, 2)
  74.               t$ = TIME$
  75.               hr$ = MID$(t$, 1, 2)
  76.               mn$ = MID$(t$, 4, 2)
  77.               sc$ = MID$(t$, 7, 2)
  78.               PRINT #1, "@echo off"
  79.               PRINT #1, "set mm="; mm$
  80.               PRINT #1, "set dd="; dd$
  81.               PRINT #1, "set yy="; yy$
  82.               PRINT #1, "set hr="; hr$
  83.               PRINT #1, "set mn="; mn$
  84.               PRINT #1, "set sc="; sc$
  85.               CLOSE
  86.  
  87.               SETDT.BAS was compiled with Turbo Basic and then compressed
  88.               with PKLITE.
  89.  
  90.               This utility is released into the Public Domain as Freeware
  91.               and no charges whatsoever are allowed for SETDT.EXE's use.
  92.  
  93.               (c)Copyright 1993 Vernon J Frazee                      -vjf-
  94.