写一个btach文件,将文件从一个网络文件夹复制到另一个网络文件夹

时间:2022-04-22 19:33:58

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.

我在网络上有一个pdf存储文件夹,其中所有用户都用来存储他们的所有文件以便彼此共享。现在我需要将该文件夹中的所有文件复制到同一网络但位于不同服务器上的另一个文件夹。

4 个解决方案

#1


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

使用xcopy并传入源和目标的UNC路径。有关xcopy的帮助,请运行:

xcopy /?

#2


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

如果它是一个Windows框,我建议使用robocopy,它可以处理重试,镜像,速度上限等等。你可以在这里找到它

#3


Use robocopy.exe available here

使用此处提供的robocopy.exe

example:

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

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

#4


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.

如果在复制时正在使用任何网络文件,则会遇到问题。确保您与网络管理员和经理讨论安排用户可以单独留下该目录的时间,以便您的副本完整无任何例外。

#1


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

使用xcopy并传入源和目标的UNC路径。有关xcopy的帮助,请运行:

xcopy /?

#2


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

如果它是一个Windows框,我建议使用robocopy,它可以处理重试,镜像,速度上限等等。你可以在这里找到它

#3


Use robocopy.exe available here

使用此处提供的robocopy.exe

example:

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

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

#4


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.

如果在复制时正在使用任何网络文件,则会遇到问题。确保您与网络管理员和经理讨论安排用户可以单独留下该目录的时间,以便您的副本完整无任何例外。