Question Locked

file name with current date

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi all,

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

backup18082008.bkf

how to do this in windows.

5 replies

by 1bn0

might entice someone to give a response.

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

by masoodsharif

Windows 2003 Server Enterprise

ntbackup

application data

no backup schedule

by bizzo

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:

http://support.microsoft.com/kb/814583

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

----------------------------------------------

by masoodsharif

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

This discussion is closed to new replies.