简体   繁体   English

Robocopy 复制(打开)用户文件

[英]Robocopy copy (opened) user files

I am using a Windows Server 2019 and I am trying to copy all Data from the C:\\Users directory with the following command (using Robocopy):我正在使用 Windows Server 2019,我正在尝试使用以下命令(使用 Robocopy)从C:\\Users目录复制所有数据:

robocopy C:\\Users "E:\\Users" /m /e /XF .temp .tmp .bak Swapfile.sys Pagefile.sys robocopy C:\\Users "E:\\Users" /m /e /XF .temp .tmp .bak Swapfile.sys Pagefile.sys

After executing the command, it will get stuck due to the fact that some files (like NTUSER.DAT) are opened.执行该命令后,由于打开了某些文件(如 NTUSER.DAT),它会卡住。 I already enabled Volume Shadow Copy (and triggered some copys) but this didn`t solve my problem.我已经启用了卷影复制(并触发了一些副本),但这并没有解决我的问题。 So does anybody have some tips or even a solution?那么有人有一些提示甚至解决方案吗?

Ps.附言。 I have to use Robocopy in a batch script, due to the given development environment.由于给定的开发环境,我必须在批处理脚本中使用 Robocopy。

This is the "error" it runs into:这是它遇到的“错误”:

FEHLER 32 (ex00000020) Folgende Datei wird kopiert C: \\Users\\Administrator\\NTUSER.DAT Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird. FEHLER 32 (ex00000020) Folgende Datei wird kopiert C: \\Users\\Administrator\\NTUSER.DAT Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird。 30 Sekunden wird gewartet... 30 Sekunden wird gewartet...

It basically says that the file NTUSER.DAT can't be copied and it will try again in 30 seconds.它基本上是说文件 NTUSER.DAT 无法复制,它将在 30 秒后重试。

I don't know!我不知道! LOL ROFL ... I hate Windows Server 2019 -> Use Windows XP!大声笑 ROFL ...我讨厌 Windows Server 2019 -> 使用 Windows XP!

Are you sure that you are executing the script as administrator ?您确定以管理员身份执行脚本吗? That could be the reason that it raises an issue.这可能是它引发问题的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM