Windows Backup Files/Folders to Date Specific File

How to use Windows Backup/Restore Wizard to backup to date specific folder/filename?

Here are the steps:

1. Create a backup scheme using Windows Backup and Restore wizard. The scheme file will end with *.bks and store under

“C:\WINDOWS\system32\ntbackup.exe backup “@C:\Documents and Settings\user\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\”

2. Download DOFF utility from We need this to output the date/time value to our backup file.

3. Create a batch file with the following text:

@echo off
for /f “tokens=1-5 delims=/ ” %%a in (‘doff yyyy/mm/dd/hh/mi’) do (
set yyyy=%%a
set dd=%%b
set mm=%%c
set hh=%%d
set mi=%%e)
md f:\%yyyy%%mm%%dd%%hh%%mi%\
C:\WINDOWS\system32\ntbackup.exe backup “@C:\Documents and Settings\user\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\dailybackup.bks” /n “%yyyy%%mm%%dd%%hh%%mi%.bkf created %mm%/%dd%/%yyyy% at %hh%:%mi% ” /d “Set created %mm%/%dd%/%yyyy% at %hh%:%mi% ” /v:yes /r:no /rs:no /hc:off /m normal /j “dailybackup” /l:s /f “f:\%yyyy%%mm%%dd%%hh%%mi%\dailybackup.bkf”

Basically what the batch file does is take year/month/day/hour/minute value from DOFF and assign to variable a/b/c/d/e/f, then make a directory with the date/time as folder name, then call Windows Backup wizard to backup the actual data to the newly created date/time folder.

4. For repeated scheduled backup, you can call the batch file to run at specific date/time by using Windows Scheduler.

By steve

Steve, Internet Peon on his journey to become a mogul. Like technology, nerd things (programming) and gadgets.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.