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
can you not try the COPY command?
these serves must be accessible either full network path or as a mapped drive
these serves must be accessible either full network path or as a mapped drive
Or the move command:
move \\server1\c$\tele\DB.bak \\server2\e$\data\
move \\server1\c$\tele\DB.bak \\server2\e$\data\
ASKER
I tried move and copy and neither worked
Wot is the error u got ?
there must be a error message .. rite ?
there must be a error message .. rite ?
have u the relevant permissions? try copying/pasting via windows explorer
do the directories actually exist?
do the directories actually exist?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
if both network shares are already available the CopyDb.bat only looks like
copy \\server1\c$\tele\DB.bak \\server2\e$\data\
leflon