www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/25/04:50:55

From: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
Organization: Materials Science Centre
To: djgpp AT delorie DOT com
Date: Tue, 25 Feb 1997 09:11:24 GMT
Subject: Re: HELP! Need to write a batch file
Message-ID: <34654ED4647@fs2.mt.umist.ac.uk>

Craig Bolland wrote:-
> I need help writing a simple DOS batch file that creates a file called
> DDMMYY.zip every day, where DD is today's date, MM is the month and YY is
> the year. The idea is to have a directory full of little zip files, each
> being automatically named differently, and each containing files updated or
> created during the day. The file will be run by the system at midnight every
> night. Any help would be immensely appreciated. Thanks.

First the job could call PKZIP or whatever to zip all new or changed files
into a file T$UPDATE.ZIP . Then it could call a small C or Fortran program
which could generate the name `ddmmyy.ZIP' and rename T$UPDATE.ZIP as
ddmmyy.ZIP. But a better choice of name would be e.g. $Uyymmdd.ZIP , so that
in a listdir sorted into filename ascii order all these update zip filenames
would come together in date order.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019