5
Contributors
5
Replies
7
Views
12 Years
Discussion Span
Last Post by Saju_C
0

Are you trying to use / or . or \ . You can't use these in dos or windows as part of a file name.

Use something like Backup060405.

Hope I actually understood your problem there.

0

I wrote a program to do that a few years back. It would create a filename using the current date. It was easy to set the parameters of the backup to whatever files I wanted to save in the backup. I will try to find it and make it available.

I do remember looking for a program to do it and did not have much luck.
It also turned out to be harder to write than I expected... About 8 pages...

I'll check around for it.

Sorry, I just re-read your post, you want to run your DOS backup on specific dates not include the date in the filename...

Do you want this to be a TSR terminate and stay resident?
or
Are you planing to put this into the autoexec.bat and check the date on boot?

0

Hi,
With ref to http://www.cervistech.com/index.php?...id=53&Itemid=2
I would like share how I generated a file with date as filename.
In my environment (it varies according to your environment), my date command output is mm/dd/yyyy
eg: 11/01/2011

So to generate a filename with yyyy-mm-dd, I used following command

echo > %date:~6,4%-%date:~0,2%-%date:~3,2%.txt

So the output is 2011-11-01.txt

to elaborate %date:~6,4% --> From left, the cursor is moved six characters right and displayed only next four characters.

Another method is to change the date format of the system from Regional and Language options. i.e Change the date separator from "/" to "-" and required date format.

~~SAJU~~

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.