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

Recommended Answers

All 6 Replies

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\

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.

Hi,

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

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.