batch file

cuti7399

Platinum Member
Jul 9, 2003
2,583
0
76
Hi all
I'm trying to create a batch file to copy one file to another in the backup location. I want to Append new data the backup file. The following line I have will do the trick but it overwrite everytime. Thanks for any help

copy c:\data\xxx.tdf c:\backup\backup.tdf

chdir c:\data

del *.tdf

:end

exit
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Try

copy /b c:\backup\backup.tdf + c:\data\xxx.tdf c:\backup\temp.tdf
del backup.tdf
ren temp.tdf backup.tdf

Throw a little error checking in there. The xcopy command might be able to do this with one switch, I don't recall precisely.