Mail Archives: djgpp/1997/02/25/01:22:18
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.
AFAIK, such a "complex" task cannot be done by COMMAND.COM's batch
files. It's simply beyond the scope of the limited command language.
At some point, you will have no choice but to use some sort of external
program to generate and read the filenames.
Alternatively, you could try using a Unix-derived shell like 'bash'
(available from SimTel as 'v2gnu/bsh1147.zip'), which does have a
half-decent script language that can easily do what you suggest.
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com |
| * Proud user of DJGPP! * | http://www.cs.com/fighteer |
| ObJoke: If Bill Gates were a robber, not only would he |
| shoot you, but he'd send you a bill for the bullets. |
---------------------------------------------------------------------
- Raw text -