fixing file names in batch programs (MSDOS)

I’m not really familiar with batch programming -What I need to do
is create a batch file which zips some files in somefolder and gives the
zip today’s date  + pre ( before changes )or + post (after
changes) as its name viz.
The file would be say 06-11-1999pre.zi p. i don’t know the command to use
capture the system date and add the extension pre /

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

you can do that with a programming language... if you want i ca write ya one...
hchibudaAuthor Commented:
i want a batch program in DOS not in any other programming language
You can't without some program(s), dos batch doesn't have output parsing or file parsing. When I need to do something like that in dos I just use qbasic which comes with dos (and the olddos folder on the windows cd)
hchibudaAuthor Commented:
show me how to do it in qbasic!
The info you gave is kinda spotty so I'll have to give you the general idea. Open Qbasic and in the main window type:

SHELL ("ECHO <your zip program><space>"+date$+"pre")

put "+date$+" (include quotes) when you want the date shown

SHELL ("ECHO c:\pk\pkzip "+date$+" c:\zipem\*.*")
then press shift-F5, you should see something like this (as per my example:

c:\pk\pkzip c:\zipem\*.*
Make sure this is the command you want to use. Now just remove the ECHO line (it was there to test it)
As per my example:

SHELL ("c:\pk\pkzip "+date$+" c:\zipem\*.*")

Then save this file (alt-f-s), I would suggest saving it as text.

Then what you need to put in your batch file is:
Qbasic program.bas

If you want more help just ask and just give us more info :)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.