Link to home
Start Free TrialLog in
Avatar of jaze95
jaze95

asked on

Copy paste a file over the network to a new server using a batch file

I have a .bak file sitting on \\server1\c$\tele\DB.bak that I want to move to \\server2\e$\data\ using a batch file
Avatar of leflon
leflon
Flag of Germany image

Hi jaze95,

if both network shares are already available the CopyDb.bat only looks like

copy \\server1\c$\tele\DB.bak \\server2\e$\data\

leflon
can you not try the COPY command?

these serves must be accessible either full network path or as a mapped drive


Avatar of vinnyd79
vinnyd79

Or the move command:

move \\server1\c$\tele\DB.bak \\server2\e$\data\

Avatar of jaze95

ASKER

I tried move and copy and neither worked
Wot is the error u got ?

there must be a error message .. rite ?
have u the relevant permissions? try copying/pasting via windows explorer
do the directories actually exist?
ASKER CERTIFIED SOLUTION
Avatar of Tele_tech
Tele_tech

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
if you need to make this a move... in your batch file... delete the source as the next step..... Sorry I focused on the getting it over there.....

there is also a verify switch that you can use the error return so not to delete the source if the xcopy fails you wil still have the orginal source