0

Hi,
Any one please help me out.

Server: In Windows 2008, am having the database file (*.bak ) in the following locations

[B]C:\program files\Microsoft Sql server\backup\test.bak[/B]

I needs to copy, the test.bak file in my local machine (windows xp) in the following path

C:\backup

Using batch script, i needs to complete this task and then i needs to schedule it out. please solve my issue. Thanks

2
Contributors
6
Replies
9
Views
5 Years
Discussion Span
Last Post by jacksantho
0

Hello,

This should work provided you have access to the file and directory listed:

copy "\\ServerNameOrIP\c$\Program Files\Microsoft Sql server\backup\test.bak" C:\backup\
0

Hi,
Thanks for your script.From where,i should run this?In the sense, i should run in the CLIENT MACHINE(destination(client window)machine from the server window machine) using DOS command.

0

Hi,

what do you meant by this line?
This should work provided you have access to the file and directory listed:

0

Hi,
thanks its working, but while doing copying i needs to append CURRENT DATE over the file.

I tries this, is not working:

[B]set folderdate=%date:~0,4%-%date:~5,2%-%date:~8,2%
COPY "\\server\c$\DB.bak" C:\temp\DB.bak%folderdate%[/B]

please solve this issue thanks.

0

Hello,
am not get you. First, am running this script in dos command and then making as a batch file and keep doing scheduling.

my system date format is it like 3/8/2012

While on doing copying, i needs to appending current system date towards the file. plz

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.