What are the challenges you face when working across database platforms? Take the survey

COPYTO Warning 140 Error: Destination file already exists.

mrobbinsmrobbins Posts: 2 Bronze 2
edited July 5, 2005 11:03AM in SQL Backup Previous Versions
I'd like to use the COPYTO command to archive backup sets done on a rotation, but when the filename is reused, I get a destination file already exists error. Is there any way to set sqlbackup to overwrite existing files with the COPYTO parameter?


  • Options
    peteypetey Posts: 2,358 New member
    No. One workaround is to build an ERASE command-line script and use xp_cmdshell to delete the files prior to the backup.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
Sign In or Register to comment.