当前位置: 动力学知识库 > 问答 > 编程问答 >

write a btach file to copy files from one network folder to another network folder

问题描述:

I am having a pdf storage folder on network in which all users used to store their all files for sharing each other . Now I need to copy all those files from that folder to another folder which is on same network but on different server.

网友答案:

Use xcopy and pass in the UNC path of the source and destination. For help on xcopy, run:

xcopy /?
网友答案:

Could you be more precise regarding your OSes, because i think that the answers may vary greatly depending on it.

If it's a windows box, i'd recommend the use of robocopy, which can handle retries, mirroring, speed capping and much more. You can find it here

网友答案:

Use robocopy.exe available here

example:

robocopy \\server1\c$\sourcedir \\server2\backup\server1 /MIR

网友答案:

You will run into problems if any network files are in use at the time of the copy. Make sure you talk with your network administrator and managers to arrange a time that users can leave that directory alone so that your copy will complete without any exceptions.

分享给朋友:
您可能感兴趣的文章:
随机阅读: