Date: Tue, 25 Feb 1997 11:35:11 +0200 (IST) From: Eli Zaretskii To: Craig Bolland cc: djgpp AT delorie DOT com Subject: Re: HELP! Need to write a batch file In-Reply-To: <5etmqt$l6h$1@grissom.powerup.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 25 Feb 1997, 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. Are you sure a simple C program isn't what you need? You can spawn PKZIP from it after constructing the command line. If you somehow need to do it with a batch file, it's possible, but tricky. You write a batch file which does this: 1) Writes the date to a file (DOS `date' won't work, because it cannot be redirected, but GNU `date' from Sh-utils will). Let's call this file DATE.DAT. 2) Calls Sed to edit the contents of DATE.DAT into a batch file which will call PKZIP with the command-line you need . 3) Calls the second batch file.