Loading ...
Sorry, an error occurred while loading the content.

[Clip] OT question

Expand Messages
  • Michael Gerholdt
    Hey, folks, I m switching jobs and need to solve one little detail before I do. I want to create a smart batch file which can create a directory name based on
    Message 1 of 2 , Feb 3, 2000
    • 0 Attachment
      Hey, folks,

      I'm switching jobs and need to solve one little detail before I do.

      I want to create a smart batch file which can create a directory name based
      on the date of the following day.

      Reason is that it will be run by a scheduler on a workstation on a given
      day. It will copy a file from folder A on one server to folder B on another
      server. Then it will copy a file from folder C on the first server to folder
      A, overwriting the original file.

      This takes place each Sunday. Folder C has the date for Monday as its name
      as follows: 02_07_00.

      I know how to use ASP/vbscript for this if it were a web application, but it
      is not. This needs to be run by an auto-scheduler program in a Win98
      environment. I anticipate using a DOS batch file but don't know how to have
      it create a filename based on the date. Do any of you know how? Or is there
      another solution you would suggest?

      I'm wondering if NoteTab can be set up like a scheduler to respond to the
      clock. I assume the clip lingo could easily create a new filename based on
      the date (though I haven't looked at that yet). Can Notetab "listen" to the
      clock and based on the event of "11:00.00 PM" for example go into action?

      Thanks,
      --Michael Gerholdt
    • Greg Chapman
      Hi Michael, ... Following day! You don t want much! :-) I can get you part of the way. Way back when... I used to run the FidoNet BATPOWER_UK echo. I ve
      Message 2 of 2 , Feb 7, 2000
      • 0 Attachment
        Hi Michael,

        > I want to create a smart batch file which can create a directory name based
        > on the date of the following day.

        Following day! You don't want much! :-)

        I can get you part of the way.

        Way back when... I used to run the FidoNet BATPOWER_UK echo.

        I've trawled through my old files and dug up this... Don't forget it's UK based
        so the format may not be quite as you'd like it.

        Rudy was one of our most reliable contributors and, of course, it doesn't give
        you the following day's date.

        I'm afraid I haven't checked out exactly what the DEBUG script is doing, but if
        you're into low level languages and with only a few bytes you should be able to
        hack it. Maybe even do the necessary arithmetic to add the extra day!

        ==========================
        (483) Tue 4 Jun 96 22:32
        By: Rudy Lacchin
        To: Vince Gillard
        Re: Date Seperators?
        St: 473<>485
        ----------------------------------------------------------------------
        Hi Vince,

        On Friday May 31 1996, Vince Gillard wrote to All:-

        VG> Can anyone suggest a way of creating a directory using the system
        VG> date as the dir name ? I tried md a:\%_DATE% but the date
        VG> separators are back slashes which causes probs.

        Change the slashes to hyphens using EDLIN:-

        echo set date=%%3>temp1.bat
        dir temp1.bat | find "TEMP1 BAT" >temp2.bat
        echo n temp.inp >temp.scr
        echo e 0100 "1r/" 1a "-" d a "e" d a 1a >>temp.scr
        echo rcx >>temp.scr
        echo 000b >>temp.scr
        echo w >>temp.scr
        echo q >>temp.scr
        debug <temp.scr >nul
        del tempscr
        edlin temp2.bat <temp.inp
        del temp.inp
        del temp.bak
        call temp2.bat
        del temp1.bat
        del temp2.bat

        It's a bit on the lengthy side, but it does the job - on my system, at
        least! The date is stored in an evar called DATE and will be in the
        format DD-MM-YY. Would YY-MM-DD be better?

        Regards,
        Rudy.

        --- GoldED/386 2.50+
        * Origin: White Light (2:253/10)

        ==========================

        Greg
      Your message has been successfully submitted and would be delivered to recipients shortly.