我在网络上有一个存储文件夹,所有用户将在服务器上存储他们的活动数据。现在,由于位置问题,服务器将被一个新的服务器所取代,所以我需要将子文件夹文件从旧的服务器存储文件夹复制到新的服务器存储文件夹。我有以下例子:

从\Oldeserver\存储\数据和文件到\新服务器\存储\数据和文件。


当前回答

你可以使用esentutl复制(主要是大文件)的进度条:

esentutl /y "my.file" /d "another.file" /o

进度条看起来是这样的:

其他回答

只是要清楚,当你使用xcopy /s c:\source d:\target时,在c:\source和d:\target周围加上"",否则你会得到错误。

如果路径中有空格,即:

"C:\Some Folder\*.txt"

但如果你有:

C:\SomeFolder\*.txt

看看基于rsync的Windows工具NASBackup。如果您熟悉rsync命令,这将是一个额外的奖励。

Windows用户

创建copyfile.bat

#!AutoCopy
xcopy /s C:\folder\from  C:\folder\to

打开cmd 输入copyfile.bat按enter键

@echo off

rem The * at the end of the destination file is to avoid File/Directory Internal Question.

rem You can do this for each especific file. (Make sure you already have permissions to the path)
xcopy /Y "\\Oldeserver\storage\data\MyFile01.txt" "\\New server\storage\data\MyFile01.txt"*
pause

rem You can use "copy" instead of "xcopy "for this example.

你可以使用esentutl复制(主要是大文件)的进度条:

esentutl /y "my.file" /d "another.file" /o

进度条看起来是这样的: