0

I have two folders in the same drive. I want to create backup of an access database. I need to copy the main file, append the name with the date and time and store it in a different folder.

Source Folder: G:\PMO\Talent Mgt\Data Source file: Talent_Management_Data.accdb

Destination File: G:\PMO\Talent Mgt\Archive\Talent_Management_Data.accdb_20120101

Any suggestions?

Peter Svensson
  • 6,105
  • 1
  • 31
  • 31
user1209689
  • 21
  • 1
  • 3

1 Answers1

0

You can achieve this by using for command to execute copy for each file. A simple batch file would be:

cd "G:\PMO\Talent Mgt\Data"
for %%A in (*.accdb) do copy %%A ..\Archive\%%A_%date:-=%
MBu
  • 2,880
  • 2
  • 19
  • 25