# Batch File to copy to Date Stamped Folder



## Bigtung (Jul 3, 2010)

I am trying to write a batch file that will copy my backup files to another drive. For example I currently have the file backed up to C:\Backup\movie backup
I want to be able to copy it to an external HDD: - 
X:\Backup Folder\Movie Library, however each time I do this it overwrites the previous backup file.
I want to be able to copy this backup to a new folder each and every time, as follows: -
Todays backup file would copy to:- 
X:\Backup Folder\Movie Library\backup 03-Jul-2010 .......tomorrows would go to 
X:\Backup Folder\Movie Library\backup 04-Jul-2010 etc
Can anyone help. I have been looking all day and can't find anything.

Thanx in advance

Jon


----------



## TheOutcaste (Aug 8, 2007)

Welcome to TSG!

Use "X:\Backup Folder\Movie Library\backup*%date%*" as the destination folder name in your batch file. The *%date%* variable will be expanded with today's date


----------



## Bigtung (Jul 3, 2010)

Outcaste

Thanx for the welcome and THANX for the headsup. Just what I was looking for and works like a charm :up:

Jon


----------

