Link to home
Start Free TrialLog in
Avatar of SeTech
SeTechFlag for United States of America

asked on

Query Analyzer Copy File

I have successfully copied 39 of 40 databases to a new Server. The one database that does not copy, has a two word name and I am assuming that is why it will not copy. I am using the Query Analyzer and the code I use is listed below. The database name is Kept Appointments the backup .bak file is Kept Appointments.bak.

The error recieved or actually message in Query Analyzer is: The system cannot find the file specified.

Can anyone explain - Thank You
xp_cmdshell 'copy \\A0116-DBS0252-S\D$\MSSQL8DataSEP3\MSSQL$SEP3\BACKUP\Kept Appointments.bak K:\Backup\Kept Appointments\Kept Appointments.bak'

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of jason_woods
jason_woods

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No points please, but jason_woods' solution would then be.        

xp_cmdshell 'copy "\\A0116-DBS0252-S\D$\MSSQL8DataSEP3\MSSQL$SEP3\BACKUP\Kept Appointments.bak" "K:\Backup\Kept Appointments\Kept Appointments.bak"'