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?
BrainMasterConnect With a Mentor Commented:
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 :)
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!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.