简体   繁体   中英

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):

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. 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.

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. 30 Sekunden wird gewartet...

It basically says that the file NTUSER.DAT can't be copied and it will try again in 30 seconds.

I don't know! LOL ROFL ... I hate Windows Server 2019 -> Use Windows XP!

Are you sure that you are executing the script as administrator ? That could be the reason that it raises an issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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