file name with current date

By masoodsharif ·
Hi all,

I just want to store my backup file with current date i.e


how to do this in windows.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

A little more information?

by 1bn0 In reply to file name with current da ...

might entice someone to give a response.

OS (version of Windows)?
Backup Application?
Data being backed up ?
Backup schedule?

Collapse -

Windows 2003

by masoodsharif In reply to A little more information ...

Windows 2003 Server Enterprise


application data

no backup schedule

Collapse -

Here's how.

by Bizzo In reply to file name with current da ...

To do this from a batch file, you'll need to determine what you want backing up and how.

I'm assuming you have the command line you can run which will backup your data to a file, say backup.bkf? If not, the switches can be found here:

The following batch file will then rename the file backup.bkf to include today's date:


@echo off

Rem Insert your command line to call ntbackup to create a backup.bkf file here

for /F "tokens=1-4 delims=/ " %%A in ('date/t') do (
set DateDay=%%A
set DateMonth=%%B
set DateYear=%%C

set CurrentDate=%DateDay%%DateMonth%%DateYear%

If exist backup.bkf rename backup.bkf backup%CurrentDate%.bkf


Collapse -

nothing happened

by masoodsharif In reply to Here's how.

i use this script but nothing happened.
please make it clear. step by step if possible

Related Discussions

Related Forums